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.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.