C Sharp case Problem 2-1 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.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 1CP: In Chapter 1, you created two programs to display the motto for the Greenville Idol competition that...
icon
Related questions
Question

C Sharp case Problem 2-1

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.
Expert Solution
Step 1

C# Program is given below - 

 

This program takes input from the user. The input is not validated as this is not mentioned in the question.

  1. An integer variable is declared and initialized by the fees of this year’s competition.
  2. Integer variables are declared to store participants for last year, present year and revenue earned in the present year.
  3. User enters the number of participants in last year’s competition.
  4. User enters the number of participants in this year’s competition.
  5. All the input from the user is displayed.
  6. The revenue earned in this year’s competition is computed and displayed.
  7. The message is also displayed whether number of participants this year is greater or not than the last year.
  8. Also, if participants are same in both years, the message is displayed accordingly.

 

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning