Click to follow our Afritutor YouTube Channel, subscribe and click notifications and get updates on new learning videos
<=Back
The following C++ program is intended to calculate and display the mean scoreof 10 students who sat for “Computer programming” test. Identify the errors in the
program.
#include<iostream.h>;
#define STUDENTS 10
INT main()
{
Int count;
float testScore[STUDENTS];
float sumOfScores, averageOfScores
sum=0;
// Enter the 10 test scores and update the sum
for(count=1;counter<STUDENTS;count++)
{
cout<"Enter a score ";
cin>>testscore[count];
sumOfScores = sumOfScores+testScore[count];
}
// calculate the average score
averageOfScores = sumOfScore/Students;
/Output the average score
cout <<"The Average Score is: "
<<averageofSCores; return 0;
 Viewed: 124 times For Better experience and learning,for video answers, after video ends playing, click next question in the questions list!!!
Share in: