Post a New Question

programming C++

posted by .

Write a program that reads test scores up to 30 into an array. sentinel will stop when -1 is entered.
Write functions that:
1. read the scores into arrays
2. computes the distribution based on whether they are As, Bs and so on
3. find how many students have the same score
4. display the number of studdents, the distribution, number of students with the same score.

This is what I have so far. I have part 1. Now I need help in total the number of students which is based on the number of grades entered. Then I need help with 3. and 4.

#include <iostream>
#include <iomanip>
#include <string>
#include <cmath>

using namespace std;

void readinfo(int);
int totalstudents (int);
void displayinfo;

int main()
{
const int VALS_LEN = 30;

int totalstudents[VALS_LEN];

cout << "Welcome to the student test manager!" << endl;
readinfo(VALS_LEN);
cout << endl;
cout << "Report " << endl;
cout << "______ " << endl;
cout << endl;
cout << "Number of students: " << totalstudents << endl;




system ("pause");
return 0;
}

void readinfo(int testscores)
{
for( int studentScores = 0; studentScores < testscores; studentScores ++)
{
while(testscores != -1)
{
cout << "Please enter student test scores (or -1 to quit): ";
cin >> testscores;

}
}
}

int totalstudents (int students)
{
int testscores;
int total = 0;

for (int students = 0; students < 30; students ++)
{
total = testscores ++;
return total;

}
}

void displayinfo

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computer Programing & Logic Design

    Submit pseudocode and a flowchart for the following programming exercise: Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average …
  2. C++ Programming

    Video Game Player Program Write a program to do the following. In main declare a Player Name Array and a Score Array. Declare the size of the arrays to be 100. In the InputData function input the player name and score into the arrays …
  3. computer programming

    write a program that can read 10 interger values into an array and find the total for that array in the program , write 3 fiunctions: a function to read values , a function to find the total of element value and a function to print …
  4. computer programming c++

    write a program that can read 10 interger values into an array and find the total for that array in the program , write 3 fiunctions: a function to read values , a function to find the total of element value and a function to print …
  5. Java Programming

    Write a program that asks the users to enter five test scores into an array
  6. programming

    Write a program which allows user to enter 10 student names and scores for Java programming 1 and Java programming 2. Allow user to choose which course they want to enter the record for. Use the loop to ask input from user. The program …
  7. computers - Programming

    Create a program that uses two parallel one-dimensional arrays. The program displays a shipping charge that is based on the number of items ordered by a customer. The shipping charge scale is shown in Figure 1 below. Store the maximum …
  8. programming

    Professor Merlin has asked you to help him. He has 5 students who have taken four tests. He wants a program where he can enter the students name and their four test scores. After entering all 5 students then he wants a grade report …
  9. java programming

    Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following methods in the program: • calcAverage—This …
  10. computer science

    write a fortran program to read in the scores of 120 students using an array

More Similar Questions

Post a New Question