My orders
How it works
Examples
Reviews
Blog
Homework Answers
Submit
Sign in
How it works
Examples
Reviews
Homework answers
Blog
Contact us
Submit
Question #92973
What will be printed because of the following code?
int x=5;
double xx=5;
cout << 1/2*x << endl;
cout << 1/2*xx << endl;
cout << x/2 << endl;
cout << xx/2 << endl;
Note- ignore newline (endl) while answering.
Expert's answer
It will be printed (without new line as question recommends):
0 0 2 2.5
Our fields of expertise
Programming
Math
Engineering
Economics
Physics
LATEST TUTORIALS
APPROVED BY CLIENTS
Thanks for the assistance,,, your service is great
#340795
on Jan 2024
Read all reviews >>