IDK why but am having a hard time getting these loops or understanding this assignment wanted to see if someone could possibly give me some direction. I am using visual studio 12 and C++ code. When i first completed the code I would get a @ symbol infinitely displayed on the screen so I made a change to a variable then it ask for diver and city then score but then would ask for inputs non stop and if i inputted a wrong value every input there after was invalid. So i changed the variables in my for loop and it now excepts the name and city as well as input then does nothing.
You have a lot of score related variables. I'm trying to figure out what the program is trying to do. How is the scoring supposed to work for each diver?
Do you mean to set lowScore = judgesScore in the second part here?
1 2 3 4 5
if (judgesScore > highScore)
highScore = judgesScore;
// check if score is lowest
if (judgesScore < highScore)
highScore = judgesScore;
Sorry this is all new to me and a new venture I have recently started to embark on because it fascinates me but I am essentially suppose to make a program to input diver's name and city as well as dive score. Here is the pseudocode file we where told to follow might give a better understanding than i have given but i greatly appreciate your help not sure why but my institute does not offer programming tutors.
iLab 3 enhanced pseudocode:
Write report heading
Loop as long as there are divers to process
Input diver's name and city
Initialize highest score, lowest score and total score
Using a do-while loop input the 5 judge's scores
Start do while ( or for loop) loop
Ask the user to input a judges score
Validate the score to ensure it is between 0 and 10
use a while loop to input another score if it is not between 0 and 10
Add score to total
Determine highest and lowest scores
If score is greater than highest assign score to highest
If score is less than lowest assign score to lowest
Increment the judgeCount variable
Input and validate the degree of difficulty
Ask the user to input the degree of difficulty
Use a while loop to make sure that the degree of difficulty is in the proper range
Calculate the overall diver's score
Subtract the high and the low from the score and divide by three
Multiply score by degree of difficulty and assign to overalscore
Display the diver's information and overall score
Add diver's overall score to the final score
Add 1 to the number of divers
Prompt the user if she wants to process another diver
Call cin.ignore();
End-Loop
Calculate the average score for all divers
Divide the final score by the number of divers
Display the number of divers and the average score for all divers
just a little more research and thought process i think i might have figure it out i essentially was running each loop separate instead of one nested loop so it was throwing everything off. will update if it officially works after i rewrite the code