Question: This exercise demonstrates how to use the FOR statement - Remove all code added between the II Your lab exercise ... comment lines - Copy/paste

This exercise demonstrates how to use the FOR statement - Remove all code added between the II Your lab exercise ... comment lines - Copy/paste the following between the comment lines int intA, Sum=0, Rand; for (IntA=1;IntA=5;lntA++){ ) cout " n";; II Loop 7 times. Use IntA as loop variable for ( aaa) \{ II Display numbers 1 through 7 on one line as shown in the example ddd 3 cout "ln"; II Loop 6 times. Use IntA as loop variable for ( aaa ) II Display the numbers 1 through 6 on one line as shown in the example ddd II Add the numbers together and assign to Sum bbb 3 cout "ln" II Display the value of Sum as shown in the example ddd Sum =0; srand(time(0)); II Loop 4 times. Use IntA as loop variable for ( aaa ) \{ II Generate a random number from 1 through 35 and assign to Rand II Display random numbers as shown in the example. They will be different ddd II Add the random numbers together and assign to Sum bbb y cout " "n"; /1 new-line II Display the value of Sum as shown in the example. It will be different - NOTE: The first FOR statements generates the numbers from 1 through 5 - Change aaa to the FOR expression as described in the preceding comment. NOTE: You will lose 5 points for each incorrect expression - Change bbb to the statement that performs the action as described in the preceding comment - Change ccc to the statement that performs the action as described in the preceding comment. HINT: See Random Numbers.pptx slide "Range of random numbers". NOTE: You use 5 points if the expression is wrong - Change ddd to the statement that performs the action as described in the preceding comment - Click on Run. The program should compile successfully - Take a screenshot that shows the Result pane showing the output Although the random numbers will be different, the Result Pane should show Hy name is John Doe The date is 11932021 2e:46 12345 The sum of the number sequence is 21 33.2528 .33 The sum of the random numbers is 119
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
