Number program
1.WAP for Sample input: 123
Output: 1+2+3
2. WAP for sample input: 123
Output:1*2*3
3. Write a program to check whether the given number is palindrome or not
Input: 121
Output: 121
4. Write a program to check whether the given number is Armstrong number or not
It is sum of cube of each digit.
Input: 153
5. WAP To check whether a given number is me on number or not
Input n=9, 9*9=81, 8+1=9.
It is the sum of square of numbers is equal to number itself.
6. Write a program to accept a number and check whether it is niven number or not.
It is a number which is divisible by its sum of its digits.
7. Write a program to accept the number to check whether it is automorphic number or not.
Automorphic number is the number in which the original number is contained in the last two digit of its
square.
Input: 25, 25*25=625
8. Write a program to find the largest digit of a given number
Input: 6594
Output: 9
9. Write a program to find the smallest digit of a given number
Input:6594
Output:4
10. Write a program to check whether the given number is duck number or not.
If a number contains one or more gross but does not start with zero is called duck number.
Input: 2405
Output: duck number
11. Write a program to check whether the given number is spy number or not.
Spy number is a number where the sum of its digits is equal to the product of its digits.
Input: 1124
1+1+2+4=8
1*1*2*4=8
12. Write a program to check whether the given number is ugly number or not.
Ugly number are positive numbers whose only prime factors are 2,3,5.
First 10 ugly numbers are 1,2,3,4,5,6,8,9,10,12.