Tuesday, October 15, 2019

To display 1, 22, 333, 4444, 55555

                                             WAP to display 1, 22, 333, 4444, 55555.
CLS
FOR I = 1 to 5
FOR J = 1 to I
PRINT I ;
NEXT J
PRINT 
NEXT I
END

Monday, October 14, 2019

To display 1, 12, 123, 1234, 12345

                                    WAP to display 1, 12, 123, 1234, 12345.
CLS
FOR I = 1 to 5
FOR J = 1 to I
PRINT I ;
NEXT J
PRINT
NEXT I

END

To display 5, 10, 15, 20....10 term

                                       WAP to display 5, 10. 15, 20......10 term
CLS
A=5
I=1
DO UNTIL I>10
PRINT A
A= A+5
I= I+1
LOOP 
END

To display 1, 4, 9,.... 10 term

                                    WAP to display 1, 4, 9,...... 10 term
CLS
A=1
DO UNTIL A> 10
PRINT A ^2
LOOP
END

To display 1, 1,2,3,5...10 term

                        WAP to display 1, 1, 2, 3, 5.... 10 term
CLS
A=1
B=1
FOR I = 1 to 10
PRINT A
C= A + B
A=C
B=C
NEXT I 
END

To display the multiplication table

                                 WAP to display the multiplication table
CLS
INPUT" Enter any number";N
FOR I= 1 to 10
PRINT N;"*";I:'=";N*I
NEXT I 
END

To display factorial

                                            WAP to display factorial
CLS
INPUT"Enter any number";N
F=1
FOR I= 1 to N
F = F*I
NEXT I
PRINT" Factorial=";F
END

To display factors

                                            WAP to display factors
CLS
INPUT" Enter any number";N
FOR I =1 THEN
IF N MOD I=0 THEN PRINT I
NEXT I
END

To display the armstrong

                                           WAP to display armstrong 
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

To display the palindrome

                                             WAP to display palindrome
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

To reverse the digits

                                           WAP to reverse the 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"Reverse the digits";S
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...