Assignment For Grade 9
Assignment For Grade 9
3.
2 -4 6 -8n terms
4.Print Series 1 12
5.
123
1234 n
*
**
***
54321
5432
543
54
5
1
12
123
1234
12345
* ***
***
* ***
***
* ***
***
* ***
Prime factors of a number are those factors which are prime in nature
and by which the number itself is completely divisible (1 will not be
taken as prime number).
Ex :Prime Factors of 24 are 2, 2, 2, 3
15. Write a Java program to input a number and check
whether it is an Automorphic Number or not
[number whose square "ends" in the same digits as the number itself]
Ex: For example, 52 = 25, 762=5776
16. Write a Java program to accept number and check
whether it is an magic number or not
A Magic number is a number whose sum of digits
eventually leads to 1.
[Ex: 19 ; 1+9 =10 ; 1+0 = 1]
17. A special two-digit number is such that when the sum of
its digits is added to the product of its
digits, the result
is equal to the original two-digit number
Example:
Consider the number 59.
Sum of digits = 5 + 9 = 14
Product of its digits = 5 x 9 = 45
Sum of the sum of digits and product of digits= 14 +
45 = 59
18.Write a Program in Java to input a number and check whether it is
a Duck Number or not.
A Duck number is a number which has zeroes present in it, but there
should be no zero present in the beginning of the number. [ex: 3210,
7056, 8430709]
19. Write a Java program to design arithmetic calculator
20. Write a menu driven program using switch case
statement
1. Factorial of a number
2. Prime or not
3. Odd or even
4. Power ( x raise to power y)