Write An Essay logo
  • Home
  • Dissertation Writing
  • Essay Writing
  • Personal Statement
  • My account
  • Order now
Order Now
Uncategorized

c# program

2 min read
Posted on 
October 4th, 2021
Home Uncategorized c# program

You are responsible for tracking the progress of a junior-high fundraiser. You decide to write a program which will help you with the task.

  • Create a console program where you will implement variables that are needed for this program and will implement the code entirely within Main.
  • Prompt the user for contributions. It should first ask for the contributor’s grade.
  • Then it should ask how much the student is contributing.
  • These prompts should be placed inside of a loop so that the program will continue to ask for contributions until a value of 999 is entered for the contributor’s grade.
  • Once that value is entered, the program should calculate the average value of the contributions.
  • Display the results, with a congratulatory message for the class which collected the largest amount.
  • Use a Boolean variable to control the while loop.
  • Use a switch statement to help get the input into the proper variables.
  • Place the switch statement within the while loop and use the Boolean variable to control the loop and set its value to false when the sentinel value (999) is detected.
  • When calculating the averages you will need a selection statement for each grade contribution to either compute the individual grade contribution average or to set it to zero if there were no contributions for that grade.

You should format your output to look like the following:

 

Please enter the grade of the contributor (6, 7, or 8)

(enter 999 to quit):

6

Please enter the amount of the contribution:

10.99

Please enter the grade of the contributor (6, 7, or 8)

(enter 999 to quit):

6

Please enter the amount of the contribution:

100.50

Please enter the grade of the contributor (6, 7, or 8)

(enter 999 to quit):

7

Please enter the amount of the contribution:

75.00

Please enter the grade of the contributor (6, 7, or 8)

(enter 999 to quit):

7

Please enter the amount of the contribution:

80

Please enter the grade of the contributor (6, 7, or 8)

(enter 999 to quit):

8

Please enter the amount of the contribution:

44.50

Please enter the grade of the contributor (6, 7, or 8)

(enter 999 to quit):

8

Please enter the amount of the contribution:

77.77

Please enter the grade of the contributor (6, 7, or 8)

(enter 999 to quit):

999

Grade Level # of Contrib Total Amount Average

6th Grade 2 $111.49 $55.75

7th Grade 2 $155.00 $77.50

8th Grade 2 $122.27 $61.14

 

Congratulations 7th graders!

Press any key to continue . . .

This will require some analysis of the problem before coding is accomplished.
It will require nested if-else statements to evaluate the conditional criteria.

Order an Essay Now & Get These Features For Free:

Turnitin Report

Formatting

Title Page

Citation

Outline

Place an Order
Share
Tweet
Share
Tweet
Calculate the price
Pages (275 words)
$0.00
Write An Essay
Company
  • Why Choose Us
  • About Us
  • Terms
  • Dissertation Help
  • Personal Statement
  • Research Paper Format
  • Term Papers
Legal
  • Write My Essay
  • Thesis Format
  • Custom Papers
  • Coursework Writing
  • Dissertation Writing
  • Essay Writing
How Our Service is Used:
Write An Essay essays are NOT intended to be forwarded as finalized work as it is only strictly meant to be used for research and study purposes. Write An Essay does not endorse or condone any type of plagiarism.
Subscribe
No Spam
© 2022 Write An Essay. All rights reserved.
Write An Essay will be listed as ‘Write An Essay’ on your bank statement.