QBASICPROGRAM TO CHECK LEAP YEAR

QBASICPROGRAM TO CHECK/FIND LEAP YEAR


LEAP YEARS : 1988,1992,.....2020,2024,etc.


 CLS
 INPUT “ENTER YEAR”; Y
 IF Y MOD 4 = 0 AND Y MOD 100 < > 0 OR Y MOD 400 = 0 THEN
 PRINT Y; IS LEAP YEAR”
 ELSE
 PRINT Y; IS NOT LEAP YEAR”
 END IF
 END

USING SUB


DECLARE SUB LEAP(Y)
 CLS
 INPUT “ENTER YEAR”; Y
 IF Y MOD 4 = 0 AND Y MOD 100 < > 0 OR Y MOD 400 = 0 THEN
 PRINT Y; IS LEAP YEAR”
 ELSE
 PRINT Y; IS NOT LEAP YEAR”
 END IF
 END SUB

Post a Comment

0 Comments