Tuesday, 22 October 2019

▪︎WAP to check 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 number is palindrome"
ELSE
PRINT "The number is not palindrome"
END IF
END

▪︎WAP to check Armstrong or not.

-> CLS
INPUT "Enter any number"; N
A = N
S = 0
WHILE N <> 0
R = N MOD 10
S = S+R^3
N = N\10
WEND
IF A=S THEN
PRINT "The number is armstrong"
ELSE
PRINT "The number is not armstrong"
END IF
END

▪︎WAP to find Product of Digits.

-> CLS
INPUT "Enter any number";₩ N
P = 1
WHILE N<> 0
R = N MOD 10
P = P*R
N = N\10
WEND
PRINT "Product of digits="; P

END

▪︎ WAP to find sum of digits.

-> CLS
INPUT "Enter any number"; N
S = 0
WHILE N<> 0
R = N MOD 10
S = S+R
N = N\10
WEND
PRINT "Sum of digits="; S

END

▪︎WAP to print greatest among three number.

-> CLS
INPUT "Enter any three number"; A, B,C
IF A>B AND A>C THEN
PRINT "The greates number is"; A

ELSEIF B>A AND B>C THEN
PRINT "The greatest number is"; B

ELSE
PRINT "The greatest number is"; C
END IF
END

▪︎WAP to display Odd or even.

-> CLS
INPUT "Enter any number"; N
IF N>0 THEN
PRINT "The number is positive"

ELSEIF N<0 THEN
PRINT " The number is negative"

ELSE
PRINT "The number is zero"

END IF
END

▪︎WAP to display Positive, Negative or zero.

-> CLS
INPUT "Enter any number"; N
IF N>0 THEN
PRINT "The number is positive"

ELSEIF N<0 THEN
PRINT " The number is negative"

ELSE
PRINT "The number is zero"

END IF
END

Project

             SWITCH Switch is a computer networking device that is used to connect many devices together on a computer network also it calle...