Answer to Question #344364 in C++ for fetty

Question #344364

int x = 32 % 4;

int y= 21 / 15;

cout << x < y;


1
Expert's answer
2022-05-24T13:54:44-0400

Cout has '<' overloaded, so you want to put "x<y" inside braces;

int main()
{
int x = 32 % 4;
int y= 21 / 15;
cout << (x < y);  // 1
    return 0;
}

Or, if you want "cout<<x<<y"; the output will be "01"


 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS