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

Based on the value of the variable i of type int, the following if-else statment

ID: 3835516 • Letter: B

Question

Based on the value of the variable i of type int, the following if-else statments could output "Yes", "No", "Maybe", or "No Way!".

if (( i < 10 ) || ( i > 30 )

   if ( i < 20 )

   cout << "Yes";

   else

   cout << "No";

else

   if ( i < 20 )

cout << "Maybe";

else

   cout << "No way!";

For each of the 4 possible outputs, give exactly 1 value of ithat will porduce that output.

If you cannot determine a value, or if you do not have enough information, explain why.

Explanation / Answer

i = 5 : "Yes"

i = 31 : "No"

i = 11 : "
Maybe"

i = 25 : "
No way !"



You can check and verify that answer is correct, Thanks let me know if there is any concern.

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