Grade calculation program (do while loop)!!

Hi, I'm in an entry level C++ course in college. I never had a programming experience before and I really need some help with a problem. Here is the statement(BTW Flowchart is done already):
1. Develop a flowchart algorithm to accomplish the following tasks. Using the flowchart template, express your algorithm as a flowchart using MS Visio.

Continue to do the following until an exit condition is given as an input:
• Normal Flow: Ask the user to enter a number which represents a score on an assignment. Classify the score as an {A+, A, B+, B, C+, C, D, F} based on the value given. Compute, but do not display the following values:
o the number of scores entered
o the highest score
o the lowest score
o the average of the scores entered so far
For each entry, display the score rounded to one decimal place along with the letter-grade equivalent. Use appropriate labels. Note that the conversion from a score to a letter grade used should match that provided in your CIS214/5 course syllabus.

• Error Handling: If one of the values entered is less than zero, the program should immediately request if the program should terminate. If anything besides a ‘y’ or ‘Y’ is entered, print out the number of scores entered, highest score, lowest score and average score (with appropriate labels.

2. Develop a set of inputs that will test all the paths in the flowchart design. Record this derivation in a .docx file.

3. Write a C++ console application (following your design) to solve the problem. All variables used must be of correct type, have meaningful names, useful comments and follow the coding standard expressed in the C++ Style text. The conversion of a score to a letter-grade must be encapsulated as a function. Other appropriate uses of functions that simplify the program are encouraged.

4. Record screen shots of tests of your program by running it at using the derived test values. The set of tests you submit must exercise all of the different success paths in your algorithm.

If the program submitted is incomplete, be sure to include a ‘readme’ text file that explains what is missing from the program to keep it from meeting the above specification.

I think my teacher wants this done with a do while loop. And and all help would be EXTREMELY appriciated! (I have no problem with you just posting the code if you feel like it BUT please comment it or explain what you did.)
Last edited on
This is the code for something relitively similar but way less specific.

#include <iostream>
#include "stdafx.h"
using namespace std;


int main(void)
{
int Num;
char Grade;

cout << "Enter your number grade (integer from 0 to 100): ";
cin >> Num;

if ((Num < 0) || (Num > 100))
Grade = 'N';
else if (Num >= 90)
Grade = 'A';
else if (Num >= 80)
Grade = 'B';
else if (Num >= 70)
Grade = 'C';
else if (Num >= 60)
Grade = 'D';
else
Grade = 'F';

cout << endl << "The letter grade is: " << Grade << endl;

if (Grade == 'N')
cout << "N stands for invalid. "
<< "You must use a number between 0 and 100." << endl;

return 0;
}

Topic archived. No new replies allowed.