Write a program that prompts the user to enter the number of students and each student’s score, then finally displays the highest score.

What will be an ideal response?


```
#include
using namespace std;

int main()
{
// Prompt the user to enter the number of students
cout << "Enter the number of students: ";
int numberOfStudents;
cin >> numberOfStudents;

double score = -1;

for (int i = 0; i < numberOfStudents; i++)
{
cout << "Enter a student score: ";
int score1;
cin >> score1;

if (score < score1)
{
score = score1;
}
}

cout << "Highest score is " << score;

return 0;
}
```

Computer Science & Information Technology

You might also like to view...

The preferred way to traverse a two-dimensional array is to use .

a. a do while statement. b. a for statement. c. two nested for statements. d. three nested for statements.

Computer Science & Information Technology

Which of the following is the correct sequence for the instruction cycle?

A) Execute, fetch, and update B) Fetch, execute, and update C) Execute, update, and fetch D) Update, fetch, and execute

Computer Science & Information Technology

Combining multiple table cells into a single, larger cell is called ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

You can spell-check an entire presentation by pressing the _____ key.

A. F2 B. F7 C. F9 D. F11

Computer Science & Information Technology