ok so i am going to be taking a c++ course next semester and was wanted to get better knowledge so i have a proble that i was givin that am having some trouble, just some pointers on where/how to start will be helpful...

Im not sure how to set count for grades or total that would be helpful to know, i dont know how to NOT quit the program is grade is not in range and theres much more i dont know but can start there. thanks in advance.

Description

Calculate your quiz average for this class.
* Valid quiz grades are from 0 - 20 and you should display an error
* when the grade is not in range, but not quit the program.
* Display the number of quizzes and the average rounded to an
* integer (out of 100).

*BEGIN Calc Long Distance phone call
* Set Count of grades = 0
* Set Total = 0
* Input first quiz grade or quit value
* WHILE (User did not enter the quit value)
* IF (Quiz Grade is valid)
* Increment Count of grades by 1
* Add value to total
* ELSE
* Display error message
* END IF
* Prompt the user for next input value or quit value
* END WHILE
* Clear Screen
* IF (any valid quiz grades were entered)
* Calculate Quiz Average out of 100 (not 20)
* ELSE
* Average = 0
* END IF
* Display # of quizzes, lowest grade and average

Recommended Answers

All 3 Replies

This does not look like a C++ code.

But it does look like nice pseudocode, if you get rid of all the silly asterisks.

Take what you've written ( or copied?) and translate that into C++ code. Declare and initialize the variables, start the loop, get data, check the input, process as needed. Keep looping.

What's the "quit value"?

first of all you have not explicitly mentioned your problem . second of all if you have your psedo code (which actually it isnt ) why dont you convert that into code itself...?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.