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
Which virus-infecting components are email messages prone to carry?
Mrac [35]

Spam Messages

Explanation:

These are messages that contain malicious codes that are usually intended to send messages to the email user's email list without his permission.

Some are easily recognized with their subject but some come in the form of useful messages.

3 0
4 years ago
Read 2 more answers
Ms. Myers commented that _____ she slept in at the hotel was better than _____ she slept in at home.
nirvana33 [79]
The bed/ the bed is the answer
6 0
3 years ago
When a user stores data in "the cloud", the data is stored on the user's premise in what is called a "cloud server"?
bija089 [108]
I'm pretty sure that's false  :0
8 0
3 years ago
Yuri, a medical assistant, has been asked to send an account of a patient's last office visit to another doctor's office. The te
g100num [7]
The internet,,

To let the other doctor know about specific details on the patient, and other excessive information.

Hope this helps!! :)
6 0
3 years ago
Read 2 more answers
Which is the last line of defense in a physical security sense?
Deffense [45]

Answer: (A) People

Explanation:

 The physical security system is the basically used in the information system. It is used in the technical and the administrator element in the security system. This is the technology oriented system that is basically used to prevent from the hacking attacks in the system.

So, the people is the last statement of the defense in the physical security as the various security system is basically used by various people.

4 0
3 years ago
Other questions:
  • In the story, what are the song pauses a metaphor for?
    7·1 answer
  • it is important to include the __ attribute of the tag because some people use text-only web browsers
    5·2 answers
  • Ms. Rogers wants to see the names of all the students who scored below 25 on the test. Which of these custom options will help h
    5·1 answer
  • Find the simple interest Jay owes on a five-year student loan of $48,000 with an annual interest rate of 5%.
    9·1 answer
  • Key differences between software and books include all of the following except
    15·2 answers
  • Websites whose URL’s contain tildes (~) are usually published by the government. True or false?
    8·2 answers
  • Next, Jamal wants to copy text from a Word document to the slide he just added. He outlines the steps to complete his task. Step
    15·2 answers
  • Why does this happen to me?
    14·1 answer
  • A proposal is also known as a
    14·2 answers
  • Examples of ________, which is hosted on a web site, include e-mail, word processing, tax preparation, and game programs.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!