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

1.Name one command that is used to implement the decision statement control stru

ID: 441313 • Letter: 1

Question

1.Name one command that is used to implement the decision statement control structure that will be studied in C++ 2. What will the following code display on the screen and where will it display? for (i = 0; i < 5; i++) cout << " "; cout << i; 3.Write a decision statement to test if a number is even or not. If it is, print "even". If it is not, add 1 to it and print "it was odd, but now it's not".

Explanation / Answer

1. " while" ," if" etc are commands used to implement decision statement control structure. e.g, while( condition is true ){do this ; } // an example of a decision statement 2. it will print 5 after 5 blank new lines like below.. ("->" is for understanding purpose ,it will not be printed in reality) -> -> -> -> -> -> 5 3. let n is the number . then the decision statement is : if(n%2==0){ cout
Dr Jack
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote