Lab 7: Looping Report

1244 Words5 Pages
Student Lab Activity A. Lab # CIS CIS170C-A3 B. Lab 3 of 7: Looping C. Lab Overview – Scenario/Summary You will code, build, and execute a program that will use looping to determine the score for a diver based on individual judge’s scores. Learning outcomes: 1. Become familiar with the different types of looping structures. 2. Be able to debug a program of syntax and logic errors. 3. Be able to use the debug step-into feature to step through the logic of the program and to see how the variables change values. D. Deliverables Section | Deliverable | Points | Lab 3 | Step 6: Program Listing and Output | 45 | E. Lab Steps Preparation: If you are using the Citrix remote lab, follow…show more content…
A nested loop is when one loop is completely contained in another loop. In an inner loop, you will read the five scores one at a time. Every time you read the score (in the loop), you will compare the score to the highest so far and also to the lowest so far so you can determine the highest and lowest scores, in addition to adding the scores up one at a time.You also need to have your program process multiple divers. Put this in an outer loop. After you process the information for one diver, prompt the user if she/he wants to process another diver. Allow the user to type either a “Y” or “y” to enter another diver's information; otherwise, exit the loop. Write an event summary by calculating and displaying the average score for all divers and the total number of divers participating.Garbage in Garbage Out (GIGO): The data being entered by the user needs to be validated. Scores by judges may range between 0 and 10. If the user enters an invalid score, display an error message, and prompt for the score again. Keep doing this until the user enters the score correctly. The degree of difficulty may range from 1.00 to 1.67. Sample output from program Report to the mediaEvent: Diving competitionEnter the diver's name: Sue JonesEnter the…show more content…
"; cin >> DegreeOfDifficulty; cout << "Do you want to process another driver (Y/N)? "; cin >> again; cin.ignore(50, '\n'); }while (again == 'y' || again == 'Y'); // print total cout << endl <<endl; cout << setprecision(2) << fixed; cout << "highestscore " << cout << " lowestscore. :" << endl; cout << "Judgelistscore is $" << total << endl; system("PAUSE"); return 0;

More about Lab 7: Looping Report

Open Document