<p> </p> <p><strong>Study the Following program:</strong></p> <p>#include <
ID: 3630786 • Letter: #
Question
<p> </p><p><strong>Study the Following program:</strong></p>
<p>#include <br />#include <br />using namespace std;<br />//Program name: TaskTwo<br />int main(void)<br />{<br />int I=5;<br />while ((I < 10) && (I > -10))<br />{<br />if (I == -3)<br />{<br />cout<<"P "; I = I + 8;<br />}<br />if (I == -2)<br />{<br />cout<<'?'; I = I + 7;<br />}<br />if (I == -1)<br />{<br />cout<<'X'; I = I - 3;<br />}<br />if (I == 0)<br />{<br />cout<<'O'; I = I + 2;<br />}<br />if (I == 1)<br />{<br />cout<<'d'; I = I * 2;<br />}<br />if (I == 2)<br />{<br />cout<<'O'; I = I - 5;<br />}<br />if (I == 3)<br />{<br />cout<<'!'; I = I / 3;<br />}<br />if (I == 4)<br />{<br />cout<<'*'; I++;<br />}<br />if (I == 5)<br />{<br />cout<<'L'; I = I % 5;<br />}<br />if (I == 6)<br />{<br />cout<<'T'; I--;<br />}<br />} // while I<br />cin.get();<br />return 0;<br />}<br /><br />Problem : Analyze the Modify the program TaskTwo to correct the error observed . The program should give one line of output: LOOP. After testing your program for correctness, print and turn in the modified program.<br /><br /></p>
Explanation / Answer
Cant understand anything. Please repost it
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.