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
When a third variable is included in an analysis and that third variable changes the relationship between the independent variab
crimeas [40]

Answer:

mediator

Explanation:

Based on the scenario being described within the question it can be said that the third variable is called a mediator. Just like a mediator in a transaction, this refers to a go-between, something (in this scenario) that attempts to change or resolve the relationship between two variables, such as described in this situation.

8 0
3 years ago
Why is it a good idea to only use one word for everything you create in Scratch, even though you can technically use two words f
Keith_Richards [23]

Answer:So if your in a situation where you need 1 of those words then your strategy would come in handy.

Explanation:

7 0
2 years ago
True or false. Embedding only part of a font is called presetting.
svetoff [14.1K]
The answer is actually false. Embedding only part of a font is called Subsetting. 
8 0
4 years ago
Please help me ASAP!
VARVARA [1.3K]

Answer:

security hacker

Explanation:

security hackers are people who hack software to check for vulnerabilities. most of the time security hackers are white hat hackers who work to perform penetration tests to see if a software is secure.

tell me if this is wrong :)

6 0
3 years ago
Read 2 more answers
Which is the correct formula to add the values in cells A1 and B1?
arlik [135]
I'm assuming you are referring to Excel. There are a few ways to add A1 and B1.

First you could use '=SUM(A1+B1)'

You could also use '=SUM(A1:B1)' which adds the values of all the cells between A1 and B1, but since they are next to each other, this would work.

You could also use '=SUM(A1,B1)' where you list all the cells you want to add with commas in between.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Jamie works on a spread sheet in which he has to label stes of data. How can he navigate between the cells in the spread sheet
    8·1 answer
  • Gathering information with your eyes is called
    13·2 answers
  • Which carrier sense technology is used on wireless networks to reduce collisions?
    7·1 answer
  • We discussed making incremental dumps in some detail in the text. In Windows it is easy to tell when to dump a file because ever
    5·1 answer
  • An empty frame used to reserve space for a picture to be inserted at a later time is known as a _____. shape image picture place
    7·1 answer
  • Question 4 (Worth 5 points)
    14·2 answers
  • State whether the following statement are true or false​
    6·1 answer
  • Describe the cutting-edge program that is referred to as agile
    5·1 answer
  • There is a group of 10 people who are ordering pizza. If each person gets 2 slices and each pizza has 5 slices, how many pizzas
    9·1 answer
  • 9. Changing from a bystander to an advocate requires
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!