Computer Studies

In a class of 60 students, 90% are present. Write a program in QBASIC to calculate the number of students present and absent.

QBASIC

QBASIC: Cmds & Stmts

84 Likes

Answer

Cls
Let T = 60
Let PRESENT = 90 / 100 * 60
Let ABSENT = T - PRESENT
Print "STUDENTS PRESENT= "; PRESENT
Print "STUDENTS ABSENT= "; ABSENT
END

Output

STUDENTS PRESENT= 54
STUDENTS ABSENT= 6

Answered By

44 Likes


Related Questions