0% found this document useful (0 votes)
8 views3 pages

Algorithm Steps[1]

The document outlines the steps for a grade calculation system, starting with user input for the number of subjects and their scores. It calculates the total score, average, and assigns a grade based on the average score. The system allows users to repeat the process for additional sets of scores or exit after displaying a thank you message.

Uploaded by

athumankasele9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Algorithm Steps[1]

The document outlines the steps for a grade calculation system, starting with user input for the number of subjects and their scores. It calculates the total score, average, and assigns a grade based on the average score. The system allows users to repeat the process for additional sets of scores or exit after displaying a thank you message.

Uploaded by

athumankasele9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

ALGORITHM STEPS:

Step 1: start/ beginning of process


Step 2: Display a message” Welcome to the grade calculation system”
Step 3: Ask user “How many subjects do you have?” and store in num-subject
Step 4: Prompt user to enter the score for each subject
if Initial score= 0
• Ask user “Enter score for subject: [current subject number]”
if, scores <= num-subject
Else, display “an error message [syntax error]” go to step 3
• Collect the total score:
Total score= current score + total score
Step 5: Calculate the average:
Average= total score/ num-subjects
Step 6: Determine the grade
If 80 <= average <= 100, grade= “A”
Else if 65 <= average <= 79, grade= “B”
Else if 50 <= average <= 64, grade= “C”
Else if 49 <= average <= 40, grade= “D”
Else, grade= “F”
Step 7: Display “average score= [average]” and “grade= [grade]”
Step 8: Ask user “Do you want to enter another set of scores? (Y/N)”
If “Y “or “y”, repeat to step 3
Else user enters N or n exit the loop go to step 9
Step 9: Display “Thank you for using the system”
Step 10: End

THE FLOWCHART

Start

Display a message:
"Welcome to the grade calculation system"
Ask user:
"How many subjects do you have?"

Initial total score= 0 and initial counter


=1

Prompt user:
Else: display: an error
"Enter the score for message [syntax error]
subject?"

If: scores<=
num-subjects

Total score = current score + total score

Average:
total score/num-subjects

Else Else
If:80<=average if:65<=average< if:50<=average<
<=100 =79 grade="B" =64 grade="C"
grade="A"

else: Elseif:40<=avera
grade="F" ge<=49
grade="D"
grade="F"
grade="F"
Display:
Average score=[average]
and Grade=[grade]

Ask user:
Do you want to enter
another set of scores? (“y”/” If: "Y" or
n”) "y"

Else: "N" or
"n"

Display:
"Thank you for using the system"

End

You might also like