math operators

im starting to learn c++ and i have to make a program with a little math , but also have to give the answer to the math problem written and i'm not sure if it goes like this:

x=(3*9*(3+(9*3/(3))));
x=(3*9*(3+(27/3)))
x=(3*9*(3+9))
x=(3*9*(12))
x=(3*108)
x=(324)

or

x=(3*9*(3+(9*3/(3))));
x=(3*9*(3+(27/3)))
x=(3*9*(3+9))
x=(3*9*(12))
x= 3*108
x= 324

the program would be

#include <iostream>
using namespace std;

int main()
{
int x= (3*9*(3+(9*3/(3))));
cout << x;
cin.get();

return 0;
}



any help would be appreciated

thanks
Last edited on
Both your calculations do the same thing and gives the correct answer.
but i was not sure if it was right or wrong to remove the parentheses from the last numbers
thanks
Topic archived. No new replies allowed.