Monday, October 14, 2019

To display the products of digits

                               WAP to display the products of digits 
CLS
INPUT"Enter any number";N
P=1
WHILE N< >0
R=N MOD 10
P= P*R
N=N\10
PRINT"Product of digits";P
END

To display the sum of digits

                                  WAP to display the sum of digits
CLS
INPUT"Enter the digit";n
WHILE n< >o
R=N MOD 10
S= S+R
N=N\10
WEND
PRINT"Sum of digits";S
END

To display greatest among three numbers

                          WAP to display greatest among three numbers
CLS
INPUT"Enter first number";A
INPUT"Enter second number";B
INPUT"Enter third number";C
IF A>B and A>C THEN
PRINT" The greatest number is ";A
ELSE IF B>A and B>C THEN
PRINT" The greatest number is ";B
ELSE
PRINT"The greatest number is ";C
END IF 
END

To display odd or even

                    WAP to display weather the number is odd or even
CLS
INPUT"Enter any number";N
IF N MOD 2=0 THEN
PRINT"THe nmber is even"
ELSE
PRINT"The number is odd"
END IF 
END 

Display positive, negative or zero

                                             WAP to display positive, negative or zero

CLS
INPUT"Enter any number";N
IF N>0 THEN
PRINT"The number is positive"
ELSE IF N<0 THEN
PRINT"The number is negative"
ELSE
PRINT"The number is zero"
END If
END

Wednesday, October 9, 2019

volume of cylinder

                                WAP  to find the volume of cylinder
CLS
INPUT"Enter radius"; r
INPUT"Enter height"; H
V= 22/7*r^2*H
PRINT"volume of cylinder";V
END

volume of cube

                                   WAP  to find the volume of cube
CLS
INPUT"Enter length";L
V=L^3
PRINT"Volume of cube";V
END

Volume of box

                                  WAP  to find the volume of box
CLS
INPUT"Enter Length";L
INPUT"Enter Breadth";B
INPUT"#Enter Height";H
V=L*B*H
PRINT"Volume of box";V
END

Area of four walls

                                  Wap to find the area of four walls
CLS
INPUT"Enter length"L
INPUT"Enter breadth"B
INPUT"Enter height";H
A=2*H*(L+B)
PRINT"Area of four walls";A
END

Area of square

                                  Wap to find the area of square
CLS
INPUT"Enter length";L

A=L^2
PRINT"Area of square";A
End

Area of circle

                                     Wap to find the area of circle
CLS
INPUT"Enter radius"; r
A= 22/7*r^2
PRINT"Area of circle";A
END

              5  days and 4 night Educational Tour We travel not to escape life but for life not to escape us . O ur school organized educ...