help me plssss..
i really dont know whast will gonna be next someone help me
the problem is this...
write a program that allows the user to enter students name followed by their test score. it will first ask how many students to enter, then asks the students name followed by their score. it will then output the average of all scores, & the student w/ the highest & lowest test score. use one dimensional array for students name & another array for the score
expected output
how many student?2
enter student #1 name:tony
enter sruden tscore 50
enter student #1 name:t
enter sruden tscore 100
the highest score is t
the lowest score is tony
average is
i think my variables are not correct..
#include<iostream>
using namespace std;
int main()
{
string name[50]={};
int s[]={};
int i;
int hn;
int l;
int k;
int n;
int largest;
int smallest;
float average;
cout<<"ENTER MANY many students?:"<<endl;
cin>>hn;
for(i=1;i<hn;i++)
{
cout<<"ENTER name of students :"<<i<<":" ;
cin>>n;{
cout<<"ENTER SCORE:";
cin>>l;}
arrays need to have a size.
if you don't know the size, use a pointer or std::vector
if this array does not need more than 1 entry, just use an integer variable