#include using namespace std; // If expresion contains more than one operator // of same precedence level // they are evaluated from left to right int main() { double d1, d2, d3,d4, d7; // declaring double data-type d1 = 12.25; d2 = 25.50; d3 = d1 * d2; cout << "\n d3 = d1 * d2 : " << d3 ; cout << "\n d1 / d2 : "<< d1 / d2; cout << "\n d3 * d2 : "<< d2 * d3; cout<< "\n Left to Right with * and / Operator Precedence"; // challenging * with / //since d3= d1 * d2; d3 = 312.375 the excpected //value of d4 with * precedence would be //d4= 312.375/312.375=1 d4= d1 * d2 /d3; cout <<"\n d4= d1 * d2 /d3 : " << d4; cout << "\n Left to Right with / and * Operator precedence "; // the d7 = 0.480392 x 312.375 = 150.062 d7 = d1 / d2 * d3; cout <<"\n d7 = d1 / d2 * d3; : " << d7; return 0; }