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, 22.06.2019 09:00
Designing a mobile web page is a little different from designing a regular web page. name at least three features that should be considered when designing a website that is mobile phone-friendly, and briefly explain why they are important.
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Write a program that displays the following menu: geometry calculator 1. calculate the area of a circle 2. calculate the area of a rectangle 3. calculate the area of a triangle 4. quit enter your choice (1-4): if the user enters 1, the program should ask for the radius of the circle and then display its area. use the following formula: area = ď€(the square of r) use 3.14159 for ď€ and the radius of the circle for r. if the user enters 2, the program should ask for the length and width of the rectangle and then display the rectangle’s area. use the following formula: area = length * width if the user enters 3, the program should ask for the length of the triangle’s base and its height, and then display its area. use the following formula: area = base * height * .5 if the user enters 4, the program should end. input validation: display an error message if the user enters a number outside the range of 1 through 4 when selecting an item from the menu. do not accept negative values for the circle’s radius, the rectangle’s length or width, or the triangle’s base or height. note: if the user enters an improper menu choice (1-4), the program prints "the valid choices are 1 through 4. run the program again and select one of those." if the user enters a negative radius, the program prints "the radius can not be less than zero." if the user enters a negative value for height or base, the program prints "only enter positive values for base and height."
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
What multimedia system creates an immersive, real-life experience that the user can interact with?
Answers: 1
question
Computers and Technology, 25.06.2019 08:10
The __ is the section of a cpu core that performs arthimetic involving integers and logical operations
Answers: 2
You know the right answer?
Now, modify the version of the greenvillerevenue program created in chapter 5 so that after the user...
Questions
question
Social Studies, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Biology, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Spanish, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Mathematics, 11.09.2020 21:01
question
Biology, 11.09.2020 21:01
question
French, 11.09.2020 21:01
question
English, 11.09.2020 21:01
question
Chemistry, 11.09.2020 21:01