1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Leno4ka [110]
3 years ago
5

Write a program that will ask the user to input 5 test grades. Store the test grades in an array. Last output the tests from the

array onto the display screen.
Sample Run: Your program must run exactly like the example below.

Enter grade 1: 100

Enter grade 2: 90

Enter grade 3: 89

Enter grade 4: 77

Enter grade 5: 100

Grade #1: 100

Grade #2: 90

Grade #3: 89

Grade #4: 77

Grade #5: 100

Press any key to continue
Computers and Technology
1 answer:
uranmaximum [27]3 years ago
5 0

Answer:

Following are the program of C++

#include <iostream> // header file

#include <iomanip> // header file  

using namespace std; // namespace

int main() // main function

{

int grade[5],k; // declaration of array  and variable

for (int i = 0;  i< 5; i++) // iterating over the loop

{

cout << "Enter grade ";

cin >> grade[i]; // read the grade by the user

}

k=0;

while(k<5) // iterating over the loop

{

cout << "Grade #" << k + 1 << ": ";

cout << grade[k] << endl; // display the grade  

k++; // increment of i

}

}

Output:

Enter grade 45

Enter grade 5

Enter grade 8

Enter grade 6

Enter grade 7

Grade #1: 45

Grade #2: 5

Grade #3: 8

Grade #4: 6

Grade #5: 7

Explanation:

The description of the program is given below.

  • Declared an array "grade" of int type  
  • Read the grade elements by the user using the for loop
  • finally, display the grade in the given format which is mention in the question.
You might be interested in
To display the size of your backup file, you can use the Windows program called: Windows Explorer Scan disk Defrag Windows Acces
Nitella [24]
Windows Explorer scan disk
7 0
2 years ago
Examine the following output:
zepelin [54]

Answer:

a. tracert

Explanation:

Tracert is a computer network diagnostic demand which displays possible routes for internet protocol network. It also measures transit delays of packets across network. The given output is produced by a tracert command.

8 0
3 years ago
The number of pixels displayed on the screen is known as ​
puteri [66]

Answer: Resolution

Explanation: The total number of pixels that can be displayed on the screen at a time is called the resolution of the screen. This resolution is normally described in the pair of numbers, such as 2560 x 1440. This means, the computer screen is 2560 pixels wide and 1440 pixels tall.

4 0
3 years ago
Troy, an aspiring screenwriter, aspires to work with a famous director known for his philanthropic work. Troy gets an appointmen
kicyunya [14]

Troy should include a short overview of the story that his video will tell and why he wants to tell it (or what the video will be about and why). It should also include the target audience, and where the video will be published.

7 0
3 years ago
Anybody remember that football game that everyone used to play during school
fiasKO [112]

Answer:

Like an actual video game or the one where you would play during recess then get in trouble when someone got hurt

Explanation:

6 0
3 years ago
Other questions:
  • Number Analysis Program: Write a program that reads data from the text file numbers.txt. Assume the file contains a series of nu
    14·1 answer
  • Your boss in the human resources department asks you to write a function that calculates the length of time that employees have
    6·1 answer
  • Your uncle spent most of his teen years in a hospital undergoing treatment for a severe physical illness. As an adult, he is rat
    10·1 answer
  • Which one of the following terms is defined as the material and surfaces upon which an artist works?
    9·1 answer
  • What happens it the offshore team members are not able to participate in the iteration demo due to time zone/infrastructure issu
    11·1 answer
  • Bernard has a visual disability. Which type of assistive technology would he use to access print on the chalkboard or overhead s
    10·1 answer
  • Ms office suite comes with its own set of pictures in the​
    5·1 answer
  • Employers can use spyware to track program usage by employees.
    12·1 answer
  • EXPLAIN WHY CRYPTOCURRENCIES ARE NOT RELIABLE.
    5·1 answer
  • 48
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!