Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# coding: In Chapter 1 , you created two programs to display the motto for the Greenville Idol competition that is held each summer during

C# coding:

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 years 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 years.

An example of the program is shown below:

Enter number of contestants last year >> 6 Enter number of contestants this year >> 14 Last year's competition had 6 contestants, and this year's has 14 contestants Revenue expected this year is $350.00 It is True that this year's competition is bigger than last year's.

Use the output structure displayed above in your program's output.

In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output statements as follows: WriteLine("This is an example: {0}", value.ToString("C", CultureInfo.GetCultureInfo("en-US")));

Starter code:

using System;

using static System.Console;

using System.Globalization;

class GreenvilleRevenue

{

static void Main()

{

// Write your main here

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

2. What should an employer do when facing an OSHA inspection?

Answered: 1 week ago