subject

Now, modify the version of the greenvillerevenue program created in chapter 5 so that after the user enters the number of contestants in this year’s competition, the user is prompted for the appropriate number of contestant names and a code for each contestant that indicates the type of talent: s for singing d for dancing m for playing a musical instrument o for other. make sure that all entered codes are valid, and if not, reprompt the user to enter a correct code. for example, if y is input, output y is not a valid code, and reprompt the user until a valid code is entered. after contestant data entry is complete, display a count of each type of talent. for example, if there were ten singers, four dancers, 7 people who play musical instruments, and 1 in the other category, the output should be: contestants with talent musical instrument are: michellenick using system; using static system. console; class greenvillerevenue{ static void main() { const int entrance_fee = 25; const int min_contestants = 0; const int max_contestants = 30; string entrystring; int numthisyear; int numlastyear; int revenue; write("enter number of contestants last year > > "); entrystring = readline(); numlastyear = convert. toint32(entrystring); while(numlastyear < min_contestants || numlastyear > max_contestants) { writeline("number must be between {0} and {1}", min_contestants, max_contestants); write("enter number of contestants last year > > "); entrystring = readline(); numlastyear = convert. toint32(entrystring); } write("enter number of contestants this year > > "); entrystring = readline(); numthisyear = convert. toint32(entrystring); while(numthisyear < min_contestants || numthisyear > max_contestants) { writeline("number must be between {0} and {1}", min_contestants, max_contestants); write("enter number of contestants this year > > "); entrystring = readline(); numthisyear = convert. toint32(entrystring); } revenue = numthisyear * entrance_fee; writeline("last year's competition had {0} contestants, and this year's has {1} contestants", numlastyear, numthisyear); writeline("revenue expected this year is {0}", revenue. tostring("c")); if(numthisyear > 2 * numlastyear) writeline("the competition is more than twice as big this year! "); else if(numthisyear > numlastyear) writeline("the competition is bigger than ever! "); else if(numthisyear < numlastyear) writeline("a tighter race this year! come out and cast your vote! "); }}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
This statement accurately describes how headlines should be placed in business documents.
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
question
Computers and Technology, 25.06.2019 17:10
What does the storyboard editor do? a. displays a close up view an individual frame in a game b. shows you all the frames in a game at the same time changes the color and size of active objects automatically adds a title screen to a game select the best answer from the choices provided ve
Answers: 1
question
Computers and Technology, 25.06.2019 19:00
What a suitable variable name to store the number of years old a person is
Answers: 1
You know the right answer?
Now, modify the version of the greenvillerevenue program created in chapter 5 so that after the user...
Questions
question
Mathematics, 20.11.2020 19:50
question
Mathematics, 20.11.2020 19:50
question
Mathematics, 20.11.2020 19:50
Questions on the website: 13722367