Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the necessary program in C++ that does the following: 1. Declares a whole number type constant value space called MAX_ITEMS and Stores the value

Write the necessary program in C++ that does the following:

1. Declares a whole number type constant value space called MAX_ITEMS and Stores the value of 6 2. Declares a string type of variable firstName to store the first name of a student. 3. Declares a Decimal number type of variable spaces called testScore, total (initialize to zero), average 4. Declares a string type of variable called letterGrade. 1. Asks (prompts) the user to input a persons name by using the prompt Enter a name: on the screen. 2. after user entered the input, for example, Carson: 3. Reads the users inputted name from the keyboard and Stores it in the array variable created for user firstName. 4. Using a for repetition structure that runs MAX_ITEMS number of times, a) Asks (prompts) the user to input that persons test score by name using the prompt Enter s test score : on the screen. b) Reads the inputted score and stores it in the testscore variable space c) Adds the testScore to the total d) Repeats getting all the MAX_ITEMS number of scores. 5. After finding the total in the loop, calculate the average and store it in the average space 6. using an if..else structure. a) Uses the average and finds the letter grade for the student and stores it in the letterGrade variable space b) Use this grading scale: 7. Displays the name of the student then the total, average and letter grade of that student.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions