1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gwar [14]
3 years ago
9

You created an interactive application named GreenvilleRevenue. The program prompts a user for the number of contestants entered

in this year’s and last year’s Greenville Idol competition, and then it displays the revenue expected for this year’s competition if each contestant pays a $25 entrance fee. The programs also display a statement that compares the number of contestants each year. Using the program you wrote in Case Study 1 of Chapter 2, replace that statement with one of the following messages:_______.
If the competition has more than twice as many contestants as last year, display The competition is more than twice as big this year!
If the competition is bigger than last year’s but not more than twice as big, display The competition is bigger than ever!
If the competition is smaller than last year’s, display, A tighter race this year! Come out and cast your vote!
Grading
When you have completed your program, click the Submit button to record your score.
Code:
using System;
using static System.Console;
class GreenvilleRevenue
{
static void Main()
{
int last, curr;
while(true) {
Console.WriteLine("Enter the number of contestants entered in last year's competition : ");
last = Int32.Parse(Console.ReadLine());
if(last < 0 || last > 30) {
Console.WriteLine("Error. Please enter a value between 0 and 30.");
} else {
break;
}
}
while(true) {
Console.WriteLine("Enter the number of contestants entered in this year's competition : ");
curr = Int32.Parse(Console.ReadLine());
if(curr < 0 || curr > 30) {
Console.WriteLine("Error. Please enter a value between 0 and 30.");
} else {
break;
}
}
if((last >= 0) && (last <= 30) && (curr >= 0) && (curr <= 30))
Console.WriteLine("The revenue expected for this year's competition : $" + curr * 25 + '\n');
if (curr > last * 2)
Console.WriteLine("The competition is more than twice as big this year!\n");
else
if (curr > last && curr <= (last * 2))
Console.WriteLine("The competition is bigger than ever!\n");
else
if (curr < last)
Console.WriteLine("A tighter race this year! Come out and cast your vote!\n");
else
Console.WriteLine("Please enter a valid value\n");
Console.ReadLine();
}
}
Computers and Technology
1 answer:
Korolek [52]3 years ago
4 0

Answer:

Explanation:

The program in this code is written correctly and has the messages applied in the code. Therefore, the only thing that would need to be done is pass the correct integers in the code. If you pass the integer 100 contestants for last year and 300 for current year. Then these inputs will provide the following output as requested in the question.

The competition is more than twice as big this year!

This is because the current year would be greater than double last years (100 * 2 = 200)

You might be interested in
Malware that is spread through security warnings or advertisements for antivirus software is known as
yaroslaw [1]
This is called Scareware this is used to <span>trick a user into buying and downloading unnecessary and potentially dangerous software. </span>
7 0
4 years ago
You have an executive who needs her print jobs handled above those of others. how would you accomplish this advanced printing co
Paul [167]
Hello <span>Lexibaby2715 
</span>

Question: <span>You have an executive who needs her print jobs handled above those of others. how would you accomplish this advanced printing configuration?
</span>

Answer: Connect several print servers to one printer


Hope This Helps!
-Chris
8 0
3 years ago
Let's say that you want to create a new Integer array with a size of 56. Pick the array that would accomplish this:
mel-nik [20]

int[] array = new int[56]

We want to create a new array, made up of integers, and of size 56. Each of the parts are represented by the answer choice above.

Hope this helps! :)

6 0
4 years ago
I WILL GIVE BRAINLIEST
Lostsunrise [7]

Answer:

i know but you to help me ok this answer b

3 0
3 years ago
A few questions related to power point.
Wewaii [24]
Here is what I gathered from these questions:

Question 2: More than one text box
Question 3: All of these

Hope this helped ^-^
7 0
4 years ago
Other questions:
  • Branching is so called because <br>​
    5·2 answers
  • Cd-roms typically use the _______ filesystem type.
    11·1 answer
  • 6-3.1 After visiting a large number of Web sites to complete your research for a lengthy research paper, your computer begins to
    14·2 answers
  • Suppose you have four 500 MB hard drives plus one 2 GB flash drive. How many GB of capacity is this overall?
    12·1 answer
  • Which pair of features is relevant when buying a pc?
    9·2 answers
  • Select the tips you should follow when writing a business report.
    12·1 answer
  • I've been trying to sign up but it says that it can't complete my registration right now. How did you guys get in? And how can I
    8·1 answer
  • Cuales fueron las consecuencias que creo el storm worm (gusano storm, el informatico)??
    5·1 answer
  • Look at (c), is it accurate? ​
    9·2 answers
  • Most jobs in computer disciplines require which minimum level of education?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!