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.
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?
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.
Get Answers For Free
Most questions answered within 1 hours.