Question

In Chapter 1, you created two programs to display the motto for the Greenville Idol competition...

In Chapter 1, you created two programs to display the motto for the Greenville Idol competition that is held each summer during the Greenville County Fair.

Now write a program named GreenvilleRevenue that prompts a user for the number of contestants entered in last year’s competition and in this year’s competition.

  • Display all the input data.
  • Compute and display the revenue expected for this year’s competition if each contestant pays a $25 entrance fee.
  • Also display a statement that indicates whether this year’s competition has more contestants than last year’s.

Here is my code so far:

  • using System;

    using static System.Console;

    class GreenvilleRevenue

    {

       static void Main()

       {

    WriteLine("Enter the number of contestants entered in last year's event:");

           int last = Int32.Parse(ReadLine());

          WriteLine("Enter the number of contestants entered in this year's competition:");

           int curr = Int32.Parse(ReadLine());

           WriteLine("The revenue expected for this year's competition" + curr * 25 +'\n');

           if (curr >last)

               WriteLine("This year number of contestants are more as compared to last\n");

           else

               WriteLine("This year number of contestants are less compare to last\n");

         

           }

       }

    }

0 0
Add a comment Improve this question Transcribed image text
Answer #1

using System;

using static System.Console;

class GreenvilleRevenue

{

static void Main()

{

       WriteLine("Enter the number of contestants entered in last year's event:");

int last = Int32.Parse(ReadLine());

WriteLine("Enter the number of contestants entered in this year's competition:");

int curr = Int32.Parse(ReadLine());

WriteLine("The revenue expected for this year's competition : " + curr * 25 +'\n');

if (curr >last)

WriteLine("This year number of contestants are more as compared to last\n");

else

WriteLine("This year number of contestants are less compare to last\n");


}

}

Output:

Enter the number of contestants entered in last year's event:45
Enter the number of contestants entered in this year's competition:60
The revenue expected for this year's competition : 1500

This year number of contestants are more as compared to last
Add a comment
Know the answer?
Add Answer to:
In Chapter 1, you created two programs to display the motto for the Greenville Idol competition...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use a C# In previous chapters, you have created programs for the Greenville Idol competition. Now...

    Use a C# In previous chapters, you have created programs for the Greenville Idol competition. Now create a Contestant class with the following characteristics: The Contestant class contains public static arrays that hold talent codes and descriptions. Recall that the talent categories are Singing, Dancing, Musical instrument, and Other. Name these fields talentCodes and talentStrings respectively. The class contains an auto-implemented property Name that holds a contestant’s name. The class contains fields for a talent code (talentCode) and description (talent)....

  • In Chapter 11, you created the most recent version of the GreenvilleRevenue program, which prompts the...

    In Chapter 11, you created the most recent version of the GreenvilleRevenue program, which prompts the user for contestant data for this year’s Greenville Idol competition. Now, save all the entered data to a Greenville.ser file that is closed when data entry is complete and then reopened and read in, allowing the user to view lists of contestants with requested talent types. The program should output the name of the contestant, the talent, and the fee. using System; using static...

  • Case Program 10 – 1: Part 1: Previously, you created a Contestant class for the Greenville Idol c...

    Case Program 10 – 1: Part 1: Previously, you created a Contestant class for the Greenville Idol competition. The class includes a contestant’s name, talent code, and talent description. The competition has become so popular that separate contests with differing entry fees have been established for children, teenagers, and adults. Modify the Contestant class to contain a field Fee that holds the entry fee for each category, and add get and set accessors. Extend the Contestant class to create three...

  • In Chapter 4 of your book, you created an interactive application named MarshallsRevenue that prompts a...

    In Chapter 4 of your book, you created an interactive application named MarshallsRevenue that prompts a user for the number of interior and exterior murals scheduled to be painted during a month and computes the expected revenue for each type of mural. The program also prompts the user for the month number and modifies the pricing based on requirements listed in Chapter 4. Now, modify the program so that the user must enter a month value from 1 through 12....

  • Case Problem 11 - 1: Modify the GreenvilleRevenue program created in the previous chapter so that...

    Case Problem 11 - 1: Modify the GreenvilleRevenue program created in the previous chapter so that it performs the following tasks: The program prompts the user for the number of contestants in this year’s competition; the number must be between 0 and 30. Use exception-handling techniques to ensure a valid value and display the error message: Number must be between 0 and 30 The program prompts the user for talent codes. Use exception-handling techniques to ensure a valid code and...

  • Modify the code, so that it will check the various user inputs for validity (e.g., months...

    Modify the code, so that it will check the various user inputs for validity (e.g., months being between 1 - 12), - if invalid value was entered, ask user to enter a new (& correct) value, - check to see if new value is valid - if valid allow the user to continue. - if still not valid repeat this process, until valid value is entered __________________________________________________________________________________________________ QUESTION: Desc: This program creates a painting order receipt. Ask for the following...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT