nest loops assignment

Overview This hands-on lab allows you to follow and experiment with the critical steps of developing a program including the program description, analysis, test plan, design and implementation with C code. The example provided uses sequential, repetition statements and nested repetition statements.

Program Description This program will calculate the average of 3 exams for 5 students. The program will ask the user to enter 5 student names. For each of the students, the program will ask for 3 exam scores. The average exam score for each student will be calculated and printed.

Interaction Starting with this project, the interactions between the program and the user are getting complicated enough to justify a new section before the Analysis section – a section which will eventually become the User’s Guide. This section is a rather detailed presentation of how the program and the user will interact. A little reflection should make it apparent that neither the Analysis nor the Test Plan can really proceed without an understanding of how the program will work from the user’s perspective. At the moment, the exact interaction is not defined by the Program Description, so this is our chance to make that interaction clear and convenient, and we will make choices. In this case, we choose to enter the 3 numbers, followed by a name. There should be spaces between the numbers and the between the third number and the student’s name. For this program, we will allow all the information to be on a single line. Here is an example, the prompt in black, the user input in red: Enter 3 grades and the student’s name: 88.76 93 98.22 Mary

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.