Question

I NEED THIS IN C# PROGRAMMING PLEASE! Here's the instructions: In Chapter 1, you created two...

I NEED THIS IN C# PROGRAMMING PLEASE!

Here's the instructions:

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's the code I have:

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("Last year's competition has {0} contestants, and this year's has {1} contestants", last, curr);
WriteLine("The number of contestants entered in this year's competition "+curr+"\n");
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");
}
}

What is wrong with it?

Homework Answers

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("\nLast year's competition has {0} contestants, and this year's has {1} contestants", last, curr);

        WriteLine("The number of contestants entered in this year's competition "+curr+"\n");
        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");
        }
}
**************************************************
I am able to run the code successfully and it gives the required output also.. So i do not find anything wrong with it.. If you have any specific concerns, please ask in comments.

Please consider providing a thumbs up to this question if it helps you. by Doing that, You will help other students, who are facing similar issue.

Know the answer?
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
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT