Class 8 Qbasic Notes
Class 8 Qbasic Notes
Features of QBASIC
Numeric variable: Those entities which holds only numeric values and changes
its value throughout the time of program execution is called numeric variables.
Note: String variable should end with ‘$’ sign and its respective value should be
enclosed within double quotation “ “.
INPUT Statement: It helps to take input from the user. PRINT “Volume is”;v
Syntax: END
Q1) Write a program to calculate area of rectangle. [A=l*b] INPUT “Enter first number”;a
END Q5) WAP to convert Nepali rupee into American dollar. [1$ = 118Rs]
Syntax: CLS
END IF END
END Q1) Write a program to input 2 different numbers and find the greatest
number.
2) IF ELSE statement
CLS
INPUT “Enter two number”; a,b PRINT n;”is not divisible by both 5 and 7”
ELSE
END IF
END
Q2) Write a program to check whether the given number is odd or even.
CLS
a = n MOD 2
IF a=0 THEN
ELSE
END IF
END
Q3) Write to check whether the given number is exactly divisible by 5 and 7.
CLS
a = n MOD 5
b = n MOD 7
ELSE