Question: This is in C++ here is the code I tried: #include using namespace std; int main(int argc, char** argv) { int archer = 0; int

This is in C++ here is the code I tried:

#include using namespace std;

int main(int argc, char** argv) {

int archer = 0; int round = 0; int score; double avgscore; int total; int finaltotal; cout > score; total = score + total; while(cin.fail() || score 60) { cin.clear(); cin.sync(); cout > round; } } cout

return 0;

}

However along with the score everything is wrong. What would be the working code?

This is in C++ here is the code I tried: #include using

In this project you will be writing a scoring application for an archery competition. For the purpose of this assignment, assume that the competition will be divided into four ends' (rounds). Three archers will compete. You will create a console C++ program that uses a nested loop to enter each archer's individual end scores and then displays the total score for each archer. Also calculate and display the overall average end score. Note: This lab does not require the use of arrays. Do not use them. We will write a similar program with arrays later in the course. Input/Output Sequence The program should prompt for each of the end scores for the first archer, then display the first archer's total score before moving on to the next archer. The overall average end score is the last output displayed. Input Validation Include domain (range) validation in your solution. The lowest score an archer can have for one end is zero. The highest is 60 (based on six arrows). If the user enters a value outside of that range, the program should display an error message and re-prompt. Validation for non-numeric input is also required. Processing and Output Target archery scores are always whole numbers. Display the average scores to one decimal place

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 Databases Questions!