Each of the following program segments has errors. Find as many as you can. A) cout int score1, score2, score3, cin >> score1 >> score2 >> score3; double average; average = (score1 + score2 +...



Each of the following program segments has errors. Find as many as you can.


A) cout <>



<>



int score1, score2, score3,



cin >> score1 >> score2 >> score3;



double average;



average = (score1 + score2 + score3) / 3.0;



if (average = 100);



perfectScore = true;// Set the flag variable



cout <><>



bool perfectScore;



if (perfectScore);



{



cout



cout <>



cout <>


B) double num1, num2, quotient;



cout <>



cin >> num1;



cout <>



cin >> num2;



if (num2 == 0)



cout <>



cout <>



cout <>



else



quotient = num1 / num2;



cout <><>



cout <><><>



cout <>


C) int testScore;



cout <>



cout <>



cin >> testScore;



if (testScore



cout <>



else if (testScore



cout <>



else if (testScore



cout <>



else if (testScore



cout <>



else



cout <>



else if (testScore



cout <>


D) double testScore;



cout <>



cout <>



cin >> testScore;



switch (testScore)



{ case (testScore



cout <>



break;



case (testScore



cout <>



break;



case (testScore



cout <>



break;



case (testScore



cout <>



break;



case (testScore



cout <>



break;



default: cout <>



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here