Write a qbasic program to print even number from 1 to 100
Answers
Answered by
3
Explanation:
Program using IF..ELSE CLS INPUT "Enter a Number: ", n IF n MOD 2 = 0 THEN PRINT "Input Number is Even" ELSE PRINT "Input Number is Odd" END IF END.
Program using only IF CLS INPUT "Enter a Number: ", n IF n MOD 2 = 0 THEN PRINT "Input Number is Even" END IF IF n MOD 2 = 1 THEN PRINT "Input Number is Odd" END IF END.
Similar questions