Answer to Question #279023 in Java | JSP | JSF for noor34

Question #279023

logic inside the forloop to test ifthe number is between 90 and 100 If the number is in this range, then it should add 1 to the tally ofgradeA. You should have another test to see if the number is between 80&89 and if it should add 1 to the tally of gradeBYou should continue to have tests for 70 to79 being gradeC60 69 being graded& below 60 being gradeF. After the for loop thendisplay a list ofhow many students had A's B'setc. in the output message box.If the data is 90 100 80 85 63 73 80 92 90The display should be like that: Create algorithmpseudocodeflowchartCreate counter variables for each letter grade.Create conditional statements to determine the number of A’s B’sC’s D’s and F’sCriteria:Grade AScore is between 90(inclusive)and100(inclusive)Grade BScore is between 80(inclusive)and 90(not inclusive)Grade CScore is between 70 (inclusive)and80(not inclusive)Grade DScore is between 60(inclusive)and 70(not inclusive)Grade FScore is below 60Print the counts for each grade in one message box.


1
Expert's answer
2021-12-13T04:28:04-0500


Start
   Declare variable numberScores
   Declare variable score
   Declare variable gradeA=0
   Declare variable gradeB=0
   Declare variable gradeC=0
   Declare variable gradeD=0
   Declare variable gradeF=0
   Display "How many scores do you wish to enter?"
   Read numberScores
   for i=0 to numberScores
        Read score
        if score>=90 and score<=100 then
            gradeA=gradeA+1
        end if
        if score>=80 and score<=89 then
            gradeB=gradeB+1
        end if
        if score>=70 and score<=79 then
            gradeC=gradeC+1
        end if
        if score>=60 and score<=69 then
            gradeD=gradeD+1
        end if
        if score<=59 then
            gradeF=gradeF+1
        end if
   End for
   Display gradeA in the message box
   Display gradeB in the message box
   Display gradeC in the message box
   Display gradeD in the message box
   Display gradeF in the message box
Stop

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog