Q.1) WAP to change degree Celsius into degree Fahrenheit.
=> CLS
INPUT
"Enter degree celsius value" ; D
F = ( 9 * C / 5
) + 32
PRINT
"Degree Fahrenheit value = "; F
END
Q.2) WAP to change dollar into Nepali currency.
=> CLS
INPUT
"Enter Dollar value"; USD
NRS = USD * 100
PRINT
"Nepali currency value = "; NRS
END
Q.3) WAP to change Indian currency into Nepali currency.
=> CLS
INPUT "Enter
Indian currency value"; IC
NRS = IC * 1.6
PRINT
"Nepali currency value = "; NRS
END
Q.4) WAP to convert paisa into rupee and paisa.
= > CLS
INPUT "Enter paisa";P
R=P MOD 100
Paise = R *100
PRINT "Rupee=";R
PRINT "Paise=";Paise
END
Q.4) WAP to convert paisa into rupee and paisa.
= > CLS
INPUT "Enter paisa";P
R=P MOD 100
Paise = R *100
PRINT "Rupee=";R
PRINT "Paise=";Paise
END
Q.5) WAP to change
minutes into hours and minutes.
=> CLS
INPUT
"Enter total minutes"; M
H = M \ 60
MIN = M MOD 60
PRINT
"Total hours = " ; H
PRINT
"Remaining minutes = "; M
END
Q.6) WAP to find the
area of rectangle
=> CLS
INPUT
"Enter length" ; L
INPUT
"Enter breadth" ; B
A = L * B
PRINT
"Area of rectangle = "; A
END
Q.7) WAP to find the
area of square.
=> CLS
INPUT
"Enter length"; L
A = L ^ 2
PRINT
"Area of square = "; A
END
Q.8) WAP to find the
area of circle.
=> CLS
INPUT
"Enter radius"; R
A = 22/7 * R ^2
PRINT
"Area of circle = "; A
END
Q.9) WAP to find the area of triangle.
=> CLS
INPUT
"Enter base"; B
INPUT
"Enter height"; H
A = 1/2 * B * H
PRINT
"Area of triangle = "; A
END
Q.10) WAP to find the
area of parallelogram.
=> CLS
INPUT
"Enter base"; B
INPUT
"Enter height"; H
A = B * H
PRINT
"Area of parallelogram "; A
END
Q.11) WAP to check
whether the number is divisible by 3 and 7 or not.
=> CLS
INPUT
"Enter any number"; A
R1 = A MOD 3
R2 = A MOD 7
IF R1 = 0 AND
R2 = 0 THEN
PRINT
"Number is divisible by 3 and 7"
ELSE
PRINT
"Number is not divisible by 3 and 7"
END IF
END
Q.12) WAP to check whether the given number is
positive/ negative/ zero.
=> CLS
INPUT
"Enter any number"; A
IF A >0 THEN
PRINT
"Number is positive"
ELSEIF A <0
THEN
PRINT
"Number is negative"
ELSE
PRINT
"Number is zero"
END IF
END
Q.13) WAP to check
whether the number is odd or even.
=> CLS
INPUT
"Enter any number" ; A
R = A MOD 2
IF R = 1 THEN
PRINT
"Number is odd"
ELSE
PRINT
"Number is even"
END IF
END
Q.14) WAP to enter
any 3 numbers and find the smallest one.
=> CLS
INPUT
"Enter any three numbers" ; A, B, C
IF A< B AND
A< C THEN
PRINT A ;
" is the smallest number."
ELSEIF B<A
AND B<C THEN
PRINT B ;
" is the smallest number."
ELSEIF C<A
AND C<B THEN
PRINT C ;
" is the smallest number."
ELSE
PRINT "All
the numbers are equal."
END IF
END
Q.15) WAP to enter
name and percentage and print the name, percentage and the division passed in.
=> CLS
INPUT
"Enter name"; N$
INPUT
"Enter percentage"; P
IF P>= 80
AND P<=100 THEN
D$ =
"Distinction"
ELSEIF P>=
60 AND P<=69.9 THEN
D$ =
"First Division"
ELSEIF P>=50
AND P<= 59.9 THEN
D$ =
"Second Division"
ELSEIF P>=40
AND P<=49.9 THEN
D$ =
"Third Division"
ELSEIF P<40
THEN
D$ =
"Failed"
ELSE
D$ =
"Wrong Entry"
END IF
END
END
Comments
Post a Comment