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
Database management systems _____. a. include transaction-processing reports for database analysis b. are used to create, organi
GaryK [48]

Answer:B. Are used to create, organize, and manage databases

Explanation: Database management system (DBMS) is a computer software which is used to collect, analyse or evaluate and retrieve data from a database. It is essential to the flow of businesses or other activities of an organisation.

Examples of database management system softwares MICROSOFT ACCESS,FOXPRO,ORACLE etc all this are effective as it helps to manipulate the data structure,field names,the file formats etc.

3 0
3 years ago
How to get fast frontend development online job as a beginner?​
mezya [45]

Answer:

hmmm well what is your magager?? every job will ask you what you can do.

3 0
2 years ago
Su now wants to highlight several inventors in her presentation, so she decides to use the underline color option.
Mars2501 [29]

Answer:

1. The home tab

2. Font group

3. The small arrow at the bottom right of the font command group.

4. On "Font" heading (then "All text" subheading)

Explanation:

The following explanation will help Su in accomplishing her task.

1. Go to the home tab;

2. From the home tab, Su will have access to various command groups but in her case, she needs the Font command group.

3. There's a small arrow located at the bottom left of the font command group section; clicking on this arrow will open the font dialogue.

4. On the font dialogue, there are two headings. The "font" heading and the "character spacing" heading.

In her case, she needs the "Font" heading. The font heading also has various subheadings. To access the underline colour option, she needs the "All text" subheading.

See attachment for picture guide.

7 0
3 years ago
Load the we8there data set from the textir package. List the first 5 restaurants’ ratings from we8thereRatings. Based on we8ther
Readme [11.4K]

Answer:

> we8thereRatings[1:5,]

  Food Service Value Atmosphere Overall

1     5       5     5          5       5

2     5       5     5          5       5

5     5       5     4          4       5

11    5       5     5          5       5

12    5       5     5          4       5

3 0
2 years ago
Analyze the following code. public class Test { public static void main(String[] args) { double radius; final double PI= 3.15169
sergiy2304 [10]

Answer:

The output of the given code as follows:

Output:

Area is: 12.60676

Explanation:

In the given code some information is missing so, the correct code to this question can be described as follows:

Program:

public class Test //defining class  

{

   public static void main(String[] args)//defining the main method

   {

       double radius= 2; //defining double variable radius

       final double PI= 3.15169; //defining double variable PI

       double area = radius * radius * PI; //defining double variable area that calculates values

       System.out.println("Area is: " + area); //print values

   }  

}

Explanation:

  • In the given java code a class "Test" is defined, in which a double variable "radius" is defined, which holds a value, that is 2.
  • In the next step, a double constant variable, that is PI is defined, that holds a value, that is "3.15169".
  • Then another double variable area is defined, that calculates the area value, and prints its value.
4 0
3 years ago
Other questions:
  • How to you put a color into a cell? <br> a.Shading<br><br> b.Fill<br><br> c.Color<br><br> d.Insert
    8·1 answer
  • A file that contains program code is called a ____________.
    13·1 answer
  • Which of the following is designed to help an organization continue to operate during and after a disruption?
    12·1 answer
  • What is the purpose for the refresh button?
    10·2 answers
  • To use a stored address, C provides us with an indirection operator, ____.
    6·1 answer
  • You enter information by keying it into the??​
    8·2 answers
  • What does considering scale mean in science?
    15·1 answer
  • Describe how to find and replace a text in a document​
    13·1 answer
  • Write a function that accepts a positive random number as a parameter and returns the sum of the random number's digits. Write a
    10·1 answer
  • Find the unknown quantities
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!