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.
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");
}
}
}
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
In Chapter 1, you created two programs to display the motto for the Greenville Idol competition...
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 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 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 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 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 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...