C. As the lead system engineer at AIT, you have been given raw data for hundred (100) students who sat for an entrance exam and you have been asked to write the pseudocode to summarize the results. For each student grade, it is written a “P” for pass and “F” for fail. 7 Use indentation and line numbers to highlight the flow of the program: Your pseudocode should address the following: i. Prompt the user to enter each result one after the other ii. Provide a count of the results of each type iii. Summarize the results indicating the number that passed or failed [5 marks] END OF PAPER
START
INIT passed = 0, failed = 0, i = 0, entered = 0, mark ="", name ="";
WHILE entered != "s"
INPUT name;
INPUT entered;
IF entered >= 60
THEN
mark = 'T';
INCREMENT passed;
ELSE
mark = 'F';
INCREMENT failed;
ENDIF
DISPLAY entered+" "+mark;
ENDWHILE ;
DISPLAY "For the student "+name;
DISPLAY "passed exams (T) "+ passed ;
DISPLAY "failed exams (F) "+ failed ;
Comments
Leave a comment