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
dimaraw [331]
3 years ago
6

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.
Computers and Technology
1 answer:
ss7ja [257]3 years ago
6 0

Answer:

The c# program is given below.

using System;

class GreenvilleRevenue  

{

   static void Main() {

       // variable declared and initialized simultaneously

       int fees = 25;

       int last, present, rev;

       Console.WriteLine( "Enter the number of contestants participating in last year’s competition " );

       last = Convert.ToInt32(Console.ReadLine());

       Console.WriteLine( "Enter the number of contestants participating in this year’s competition " );

       present = Convert.ToInt32(Console.ReadLine());

       Console.WriteLine( "Number of Participants in last year's competition  \t\t" + last);

       Console.WriteLine( "Number of Participants in present year's competition   \t" + present);

       rev = present*fees;

       Console.WriteLine( "Revenue expected in this year’s competition is \t\t\t$" + rev );

       if(last < present)

           Console.WriteLine( "Participants are more this year" );

       else if(last > present)

           Console.WriteLine( "Participants are less this year" );

       else if(last == present)

           Console.WriteLine( "Participants are same both years" );

   }

}  

OUTPUT

Enter the number of contestants participating in last year’s competition  

111

Enter the number of contestants participating in this year’s competition  

123

Number of Participants in last year's competition    111

Number of Participants in present year's competition    123

Revenue expected in this year’s competition is   $3075

Participants are more this year

Explanation:

This program takes input from the user. The input is not validated as this is not mentioned in the question.

1. An integer variable is declared and initialized by the fees of this year’s competition.

2. Integer variables are declared to store participants for last year, present year and revenue earned in the present year.

3. User enters the number of participants in last year’s competition.

4. User enters the number of participants in this year’s competition.

5. All the input from the user is displayed.

6. The revenue earned in this year’s competition is computed and displayed.

7. The message is also displayed whether number of participants this year is greater or not than the last year.

8. Also, if participants are same in both years, the message is displayed accordingly.

You might be interested in
Write the function mystrchr(). the function has two parameters: a const char * s pointing to the first character in a c-style st
GrogVix [38]
<span>c. return a pointer to the first appearance of c appearing inside s and nullptr (0) if c does not appear inside s.</span>
7 0
3 years ago
The algorithm ____ is used to find the elements in one range of elements that do not appear in another range of elements.
Musya8 [376]

Answer:

A. set_union

Explanation:

The algorithm set_union is used to find the elements in one range of elements that do not appear in another range of elements.

4 0
3 years ago
Which biometric technique is considered nearly infallible from a scientific point of view and is increasingly preferred by crimi
Sergio039 [100]

Answer:

DNA analysis

Explanation:

DNA is unique for all individuals. DNA analysis is the process of analysing the DNA characteristics of an individual.

DNA profiling is used in forensics to identify the suspects involved in criminal activities.

1. In the process, DNA of the suspects is matched with the DNA found in the site of the crime.

2. If a match is found, it indicates that the genetic relationship exists between the suspect and the criminal or the crim.

3. The order from the court is needed to obtain the DNA of the suspects. The sample can be in the form of blood or saliva.

4. The sample obtained should have adequate cells which contain the DNA.

Issues  

The DNA obtained from the crime site is not pure or proper enough to be ideal for the DNA profiling.

Degraded sample

1. The sample obtained from the site of the crime is not always adequate to obtain the actual DNA.

2. The sample can be contaminated due to the environmental factors.

3. The sample obtained is too less and hence, should be examined accurately in order not to waste the sample.

DNA mixture

4. The sample obtained from the site of the crime is found to contain DNA from more than one individual.

 

Profiling types

DNA profiling can be carried out by using any of the techniques mentioned below.

1. RFLP analysis (  Restriction fragment length polymorphism )

This uses the Southern blot technique. The blot process needs a large amount of the sample. Also, this works well only when the sample is not degraded.

2. Polymerase chain reaction (PCR) analysis

3. STR analysis ( short tandem repeats )

4. AFLP ( amplified fragment length polymorphism )

This is an automated and low-cost process. It is easy to set up and operate which makes this process common in low income countries.

All the methods mentioned above have their own advantages and drawbacks.

5 0
3 years ago
A typical analog cell phone has a frequency of 850 mhz; a digital phone a frequency of 1950 mhz. compared to the signal from an
Zepler [3.9K]
A higher frequency than the analog cell phone.
5 0
3 years ago
If you find yourself boxed in by a vehicle on your left or right _____________
Zepler [3.9K]

Answer: A. speed up or slow down briefly

Explanation:

put that and then i saw someone said b and it was wrong and i got mad because it was the only answer i got wrong. but it’s a

4 0
3 years ago
Read 2 more answers
Other questions:
  • What effects will the different types of lighting produce on mountains?
    15·1 answer
  • Davia draws a shape with 5 sides. two sides are each 5 inches long. two other sides are each 4 inches long. the perimeter of the
    15·1 answer
  • What tool listed below will be the most useful for developing presentation content?
    10·2 answers
  • What cannot be performed using windows task manager
    10·1 answer
  • What are the advantages and disadvantages of fortran?
    13·1 answer
  • Neymar machine that Run on electricity
    11·1 answer
  • You wrote a program to find the factorial of a number. In mathematics, the factorial operation is used for positive integers and
    14·2 answers
  • How are computers classified into different types? Explain ​
    6·1 answer
  • Which era marked a switch from agricultural practices to industrial practices?
    6·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!