Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 345 Weeks Ago, 4 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 29 May 2017 My Price 6.00

Write a program which repeatedly asks the user to enter students' score

Write a program which repeatedly asks the user to enter students' score in a test until the user enters -1. Once the user enters -1, the program outputs the average of all the grades. Use a while loop to keep getting a new grade (grade must be from 0 to 100). Keep count of how many grades have been entered and calculate the total of all the grades. To compute the average: Divide the total grades by number of grades.

Compute the highest grade among all the grades. (Hint: highest grade: assume the first one to be the highest grade, for each new number, check whether it is higher than the current highest (max), if it is, set it as our new highest. At last, output the average and highest grade.)

Note: Double check that the average calculated at the end doesnA????1t include the -1.

Example of input/output: To get final average and highest score, enter -1.

Enter the score for student 1: 100

Enter the score for student 2: 65

Enter the score for student 3: 40

Enter the score for student 4: 80

Enter the score for student 5: 80

Enter the score for student 6: -1

The average is 73

The highest score is 100

 
 

 

Answers

(8)
Status NEW Posted 29 May 2017 07:05 AM My Price 6.00

-----------

Attachments

1496041907-1230057_2_636315395526366228_sample-output.PNG
file 1496041929-Answer.docx preview (416 words )
W-----------rit-----------e a----------- pr-----------ogr-----------am -----------whi-----------ch -----------rep-----------eat-----------edl-----------y a-----------sks----------- th-----------e u-----------ser----------- to----------- en-----------ter----------- st-----------ude-----------nts-----------' s-----------cor-----------e i-----------n a----------- te-----------st -----------unt-----------il -----------the----------- us-----------er -----------ent-----------ers----------- -1-----------. O-----------nce----------- th-----------e u-----------ser----------- en-----------ter-----------s ------------1, -----------the----------- pr-----------ogr-----------am -----------out-----------put-----------s t-----------he -----------ave-----------rag-----------e o-----------f a-----------ll -----------the----------- gr-----------ade-----------s. -----------Use----------- a -----------whi-----------le -----------loo-----------p t-----------o k-----------eep----------- ge-----------tti-----------ng -----------a n-----------ew -----------gra-----------de -----------(gr-----------ade----------- mu-----------st -----------be -----------fro-----------m 0----------- to----------- 10-----------0).----------- Ke-----------ep -----------cou-----------nt -----------of -----------how----------- ma-----------ny -----------gra-----------des----------- ha-----------ve -----------bee-----------n e-----------nte-----------red----------- an-----------d c-----------alc-----------ula-----------te -----------the----------- to-----------tal----------- of----------- al-----------l t-----------he -----------gra-----------des-----------. T-----------o c-----------omp-----------ute----------- th-----------e a-----------ver-----------age-----------: D-----------ivi-----------de -----------the----------- to-----------tal----------- gr-----------ade-----------s b-----------y n-----------umb-----------er -----------of -----------gra-----------des-----------. -----------Com-----------put-----------e
Not Rated(0)