Write a program named GreenvilleRevenue that prompts a user for the number of co
ID: 671944 • Letter: W
Question
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.
In chapter 1, you created two programs to display the motto for the Greenville idol competition that is held each summer during the Greenville country fair. Now, write a program named Greenville revenue that prompts a user for the number of contestants entered in lasts competition and in this years competition. Display all the input data. Compute and display the revenue expected for this years competition if each contestant pays a $25 entrance fee. Also display a statement that indicates whether this years competition has more contestants than last yearsExplanation / Answer
using System;
public class Test{
public static void Main(){
Console.WriteLine("Enter the number of contestants entered in last year's competition : ");
int last = Int32.Parse(Console.ReadLine());
Console.WriteLine("Enter the number of contestants entered in this year's competition : ");
int curr = Int32.Parse(Console.ReadLine());
Console.WriteLine("the revenue expected for this year's competition "+curr*25+' ');
if (curr > last)
Console.WriteLine("This year number of contestants are more as compared to last ");
else
Console.WriteLine("This year number of contestants are less as compared to last ");
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.