QBASIC PROGRAM TO FIND WHETHER A STUDENT IS PASS OR FAIL

QBASIC PROGRAM TO FIND WHETHER A STUDENT IS PASS OR FAIL



CLS
 INPUT ENTER ANY FOUR SUBJECT'S MARK; a, b, c, d
 total = a + b + c + d
 avg = total / 4
 IF avg > 40 THEN
 PRINT You are pass
 ELSE
 PRINT you are fail
 END IF
 END

USING SUB


DECLARE SUB PASSFAIL(a,b,c,d)
 CLS
 INPUT ENTER ANY FOUR SUBJECT'S MARK; a, b, c, d
 CALL PASSFAIL(a,b,c,d)
 END
 
 SUB PASSFAIL(a,b,c,d)
 total = a + b + c + d
 avg = total / 4
 IF avg > 40 THEN
 PRINT You are pass
 ELSE
 PRINT you are fail
 END IF
 END SUB

Post a Comment

0 Comments