Question: You have to find all syntactical errors in the given code by writing the line number where you found the error, what the error is

You have to find all syntactical errors in the given code by writing the line number where you found the error, what the error is, and your correction. At least 10 errors.
// initialize total_score and count to b
F/* This program will first get all test scores of a student.
Then calculate its average.
*/
#include iostream
use namespace std;
Int main()
{
int score; total_score, count;
int average_score; // we only want the integer part of average score
// initialize total_score and count to be zero
total score =0;
count =0,
// get all input scores
cout >> "Enter scores. Enter a negative value to stop: ";
do {
cin score;
if (score >=0){
total score t= scone: /// add the score to total scoree zero
total score =0;
coun't =0,
// get all input scores
cout >> "Enter scores. Enter a negative value to stop: ";
do {
cin score;
if (score >=0){
total_score += score; // add the score to total score
count + ; // increase score count by 1
}while (score >=0)
// calculate average
if (count >0)
average = total_score / count;
cout "Your average score is: " average_score endl;
else;
cout "You have no score entered./n";
system(pause);
return 0;
}
}
G/* This program will first get all test scores of a student.
Then calculate its average.
*/
#include iostream
use namespace std;
Int main()
{
int score; total_score, count;
int average_score; // we only want the integer part of average score
// initialize total_score and count to be zero
total score =0;
count =0,
// get all input scores
cout >> "Enter scores. Enter a negative value to stop: ";
do {
cin & score;
// initialize total_score and count to be zero
total score =0;
coun't =0,
// get all input scores
cout >> "Enter scores. Enter a negative value to stop: ";
do {
cin \ll score;
if (score >=0){
total_score += score; // add the score to total score
count + ; // increase score count by 1
}while (score >=0)
// calculate average
if (count >0)
average = total_score / count;
cout "Your average score is: " average_score endl;
else;
cout "You have no score entered./n";
system(pause);
return 0;
}
You have to find all syntactical errors in the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!