Write an algorithm that inputs marks and prints the message “PASS” or “FAIL.” Passing marks are 33.

Check if a student has passed or failed based on marks

Problem Statement: Input a student’s marks and print “PASS” if the marks are greater than or equal to 33, otherwise print “FAIL”.

Algorithm:

  1. Start
  2. Input the student’s marks (marks).
  3. If the marks are greater than or equal to 33, then:
    • Print “PASS”
  4. Else:
    • Print “FAIL”
  5. End

Explanation: The pass condition is simple: If the marks are 33 or above, the student passes; otherwise, they fail. The algorithm checks the condition and prints the respective message.