CLS
INPUT "Enter any number"; N
S = 0
WHILE N <> 0
R = N MOD 10
S = S * 10 + R
N = N \ 10
WEND
PRINT "Reversed digits is "; S
END
Search This Blog
Monday, October 14, 2019
15. To Display the given number is 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
Sunday, October 13, 2019
16. To Display armstrong
CLS
INPUT "Enter a 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 "It is armstrong number";
ELSE
PRINT "It is not armstrong number";
END IF
END
INPUT "Enter a 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 "It is armstrong number";
ELSE
PRINT "It is not armstrong number";
END IF
END
17. To Display Prime or Composite
CLS
INPUT "ENTER ANY NUMBER"; N
C = 0
FOR I = 1 TO N
FOR I = 1 TO N
IF N MOD I = 0 THEN C = C + 1
NEXT I
IF C = 2 THEN
PRINT N; "IS PRIME NUMBER"
ELSE
PRINT N; "IS COMPOSITE NUMBER"
END IF
END
18. To Display Factor
CLS
INPUT "Enter any number";N
FOR I = 1 To N
IF N MOD I = 0 THEN PRINT I
NEXT I
END
INPUT "Enter any number";N
FOR I = 1 To N
IF N MOD I = 0 THEN PRINT I
NEXT I
END
19. To Display Factorial number
CLS
INPUT "Enter any number";N
F = 1
FOR I = 1 To N
F = F * I
NEXT I
PRINT "Factorial number";F
END
INPUT "Enter any number";N
F = 1
FOR I = 1 To N
F = F * I
NEXT I
PRINT "Factorial number";F
END
20. To Display multiplication table
CLS
INPUT "Enter any number"; N
FOR I = 1 TO 10
PRINT N; " X " ; I ; " = " ; N * I
NEXT I
END
INPUT "Enter any number"; N
FOR I = 1 TO 10
PRINT N; " X " ; I ; " = " ; N * I
NEXT I
END
21. To Display 1,1,2,3,5,8....10th term
CLS
A = 1
B = 1
FOR I = 1 To 10
C = A + B
A = B
B = C
NEXT I
END
A = 1
B = 1
FOR I = 1 To 10
C = A + B
A = B
B = C
NEXT I
END
25. 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
FOR I = 1 To 5
FOR J = 1 To I
PRINT I;
NEXT J
NEXT I
END
Monday, September 2, 2019
My Father
My Father
My father is also an ideal person of my life. He is my real hero and my best friend ever. He always helps me a lot in my any difficulty. He is an internet marketing manager in a limited company in New Delhi. He is very famous person in his office as well as in the society because of his gentleness and politeness.He is very intelligent man and always helps others in their problems. He is the boss of my family and gives advice and instruction to every family member. He solves problems of the neighbours. My father is very kind-hearted person and my real hero and best friend. He always shares with me his all the bad an happy moments. He tells me that he discuss his all life events to me to give me experience and take right steps in the absence of him. My father is very lovely father of the world. He is my real hero, best friend, my inspiration and best person of my life I ever seen. He is the person who helps me a lot in getting prepared for the school, getting rise of the bed and getting my home work done well.
Subscribe to:
Posts (Atom)