find the expected output

closed account (D4NbpfjN)
For this I am suppose to give an expected output. I got some of it, but some of it i dont. Does anyone know how to do an expected output

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
int main().
 {
	int someInt,
	 w = 5, x = 9, y = 2, z = 7;
	 char someChar = 'A';
	  cout << "operator precedence \n";				
	 cout << (x - 1) / (x - w) * y << endl;				 
	 cout << (x - 1) / ((x - w) * y) << endl;				 
	cout << static_cast<double>(x) / y << endl;			 
	cout << x / y << endl;						 
   cout << (w + x % 7 / y) << endl;				
 cout << (abs(y - w) + sqrt(x)) << endl;			
	 someInt = someChar;
	 cout << someChar << " "
	 << someInt << endl;
	 
		 return 0;
	  }
Last edited on
Did you try running it?

1
2
3
4
5
6
7
8
operator precedence
4
1
4.5
4
6
6
A 65


PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.
Last edited on
closed account (D4NbpfjN)
yes. that is exactly what i got. So there is no such thing as an expected output for int someInt? or the other ones?
Topic archived. No new replies allowed.