Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is the output of the following C++ code? if (x < 20 && y > 20); { x = 2 * x

ID: 3550219 • Letter: W

Question

What is the output of the following C++ code? if (x < 20 && y > 20); {     x = 2 * x; y = y / 2; cout << x << " " << y << x - y << endl; } else { x = y / x; cout << x << " " << y << " " << x * x + y * y << endl; What is the output of the following C++ code? if (x < 20 && y > 20); {     x = 2 * x; y = y / 2; cout << x << " " << y << x - y << endl; } else { x = y / x; cout << x << " " << y << " " << x * x + y * y << endl;

Explanation / Answer




like if x=10 , y=24 then

x=2*10=20

y=24/2=12

output :   20 12 8


and if x=26 , y= 2 then

x=26/2=13

output ;    13 2 173


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote