CLS
INPUT"Enter length";l
V=l^3
PRINT"Volume of cube=";V
END
Friday, October 4, 2019
Volume of cylinder
CLS
INPUT" Enter radius";r
INPUT" Enter height";h
V=22/7*r^2*h
PRINT"Volume of cylinder=";V
END
INPUT" Enter radius";r
INPUT" Enter height";h
V=22/7*r^2*h
PRINT"Volume of cylinder=";V
END
display odd or even
CLS
INPUT" Enter any number";N
IF N MOD 2 = 0 THEN
PRINT"The number is even"
ELSE
PRINT" The number is odd"
END IF
END
INPUT" Enter any number";N
IF N MOD 2 = 0 THEN
PRINT"The number is even"
ELSE
PRINT" The number is odd"
END IF
END
sum of digits
prime or composite
Reverse of digits
CLS
INPUT'Enter any number";N
S = 0
WHILE N < > 0
R = N MOD 10
S = S * 10 + R
N = N / 10
WEND
PRINT"Sum of reverse of digits=";S
END
INPUT'Enter any number";N
S = 0
WHILE N < > 0
R = N MOD 10
S = S * 10 + R
N = N / 10
WEND
PRINT"Sum of reverse of digits=";S
END
Palindrome or not
CLS
INPUT"Enter any number";N
A = N
S = 0
WHILE N < > 0
R = N MOD 10
S = S * 10 + R
N = N/ 10
WEND
IF A = S THEN
PRINT"The given number is palindrome"
ELSE
PRINT"The given number is not palindrome"
END IF
END
INPUT"Enter any number";N
A = N
S = 0
WHILE N < > 0
R = N MOD 10
S = S * 10 + R
N = N/ 10
WEND
IF A = S THEN
PRINT"The given number is palindrome"
ELSE
PRINT"The given number is not palindrome"
END IF
END
Greatest among three number
display positive, negative, or zero
Armstrong or not
Thursday, October 3, 2019
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
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
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
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 rectangle
CLS
INPUT Enter length";l
INPUT "Enter breadth";b
A=l*b
PRINT "Area of rectangle=";A
END
INPUT Enter length";l
INPUT "Enter breadth";b
A=l*b
PRINT "Area of rectangle=";A
END
Subscribe to:
Posts (Atom)