Saturday
April 18, 2015

Homework Help: programming C++

Posted by Erika on Thursday, February 9, 2012 at 8:42pm.

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

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Java Programming - Write a program that asks the users to enter five test scores...
programming - Write a program which allows user to enter 10 student names and ...
C++ Programming - Video Game Player Program Write a program to do the following...
programming - Professor Merlin has asked you to help him. He has 5 students who ...
computer programming c++ - write a program that can read 10 interger values into...
computer programming - write a program that can read 10 interger values into an ...
programming - Write a Java application that computes and prints the grade of a ...
programming - A. Write a program which reads an array of up to 200 integers from...
Computer Programing & Logic Design - Submit pseudocode and a flowchart for the ...
Programming - Write a program to do the following: In main, declare a Player ...

Members