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
Write a query to display the department name, location name, number of employees, and the average salary for all employees in th
Zigmanuir [339]

Answer:

is hjs yen ; he jawjwjwjwjw

6 0
2 years ago
Select the correct answer. Hudson has to maintain confidential college data in a spreadsheet. He needs two team members to help
AlladinOne [14]

Answer:

B. Protection

Explanation:

It is the protection tab. We can protect a cell from being changed or altered by any other user of the excel sheet using the protection tab. We only need to select the cell, and right-click, Now choose the protection tab, which will be shown. And now select locked and click ok. This cell cannot then be changed by anyone else other than you. Hence, the correct option here is the protection tab.

4 0
3 years ago
Proponents of Internet freedom see its _____________ as providing protection for unpopular expression; proponents of greater Int
diamong [38]

Answer:

anonymity

Explanation:

<h2><u>Fill in  the blanks </u></h2>

Proponents of Internet freedom see its <u>anonymity </u>as providing protection for unpopular expression; proponents of greater Internet control see it as the Internet's greatest danger.

6 0
3 years ago
Is the following statement valid or invalid? Give reason if it is invalid. int 2a = 6:​
zubka84 [21]

Answer:when the principle die the irrevocable power of attorney is valid or invalid

Explanation:

4 0
1 year ago
Anyone know how to fix this
gizmo_the_mogwai [7]

Put the mouse at the top of the black part and click and hold down, and then drag it down to the bottom. And don't feel embarrassed to ask somebody lol

3 0
3 years ago
Other questions:
  • g Suppose the vertex data is stored in an array named verts and each vertex uses a list to store the coordinates. Write the code
    7·1 answer
  • IN MICROSOFT EXCEL YOU CAN UES FOMULA TO DIVIDE OR MULTIPLY WHAT IS THE CORRECT FORMULA TO CALCULATE 4*6
    14·1 answer
  • An email address contains the @ character. Write a program that takes asks for an email address input from the user and determin
    5·1 answer
  • What is the nearest ten cents of 453.56
    5·1 answer
  • Examples of system software include operating systems like macos, Linux, Android and
    10·2 answers
  • Aranjează următoarele cuvinte din documentul word Proiect, într-o scrisoare în care soliciți directorului școlii sprijin în priv
    8·1 answer
  • Sub to the channel plz plz
    6·2 answers
  • To what extent do you agree with the assertion that “Collection development begins with community analysis”. (Give reasons to bu
    7·1 answer
  • Impromptu speaking ability is very important in the workplace to clearly and effectively communicate ideas. An effective impromp
    8·2 answers
  • Display the Approval Form worksheet and create an IF statement in cell B13 to determine if the applicant is eligible for a perso
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!