Draw a flowchart and write pseudo code for a program that allows a student to enter his/her name, student number, sex arid age. If the age is below 18 years, the program should reject the student, otherwise the student is allocated class LBIS12O1 if they are male, else they are allocated to LBIS12O2. The program prints the details of the student and informs him/her which class they are allocated. Write the pseudocode for the same problem
name = readString
number = readString
sex = readString
age = readInt
IF age < 18 THEN
print("Refjected")
ELSE
IF sex == "M" THEN
class = "LBIS1201"
ELSE
class = "LBIS1202"
ENDIF
print(name + " " + number + " " + sex + " " + age + " " + class)
ENDIF
Comments
Leave a comment