Question
// This program averages 3 test scores. It repeats as // many times as the user wishes. #include using namespace std; int main() { int
// This program averages 3 test scores. It repeats as
// many times as the user wishes.
#include
using namespace std;
int main()
{
int score1, score2, score3, score4; // Three scores
double average; // Average score
char again; // To hold Y or N input
do
{
// Get three scores.
cout
cin >> score1 >> score2 >> score3 >> score4;
// Calculate and display the average.
average = (score1 + score2 + score3 + score4) / 3.0;
cout
// Does the user want to average another set?
cout
cin >> again;
} while (again == 'Y' || again == 'y');
return 0;
system("pause");
}
using the above template.
Project14 . Create a propect cald Projett4 (uning p67) 2. Add another score scoret 3. Do the aerage for the 4 seres 4. Change he condfon on while statament tor h user wrote the wond "nf, the loin will end 5. Charge the do-wtile loop to vitile ls 6. Read 4 stcortes or 4 sudens 7. Calculate and print he average r fre sbudent for laStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started