M1-Assignment Solution-Algorithm
M1-Assignment Solution-Algorithm
Writing algorithm helps a programmer to get a big picture of the app requirements. Since, report
card generator app would require a large number of lines of code, we will first write a rough
algorithm and then convert that rough algorithm into a detailed algorithm. The finalized detailed
algorithm will be used as a reference to write the actual C program.
Note: It is not necessary that the algorithm which you have submitted will match with the given
algorithm in this file. The following algorithm is based on the app code solution provided to you.
If you are able to generate the desired final output from your C program using your algorithm
then you can consider your algorithm as correct.
Rough Algorithm
Rough Algorithm is meant to get a big picture of app requirement
Step 1: Declare required variables to store information such as name, section, grade, standard,
total marks secured, and five more variables store marks secured in each subject
Step 2: Print welcome message
Step 3: User input for name, standard, section, and marks secured in all the five subjects
Step 4: Compute total marks secured
Step 5: Terminate the program is the total marks secured is greater than 500 or less than 0
Step 6: Compute grade using if-else conditional statements
Step 7: Generate the report card by writing appropriate print statements using tab characters and
new line characters
Detailed Algorithm
Converting the rough algorithm into a detailed algorithm so as to avoid any mistake while
writing the actual program