9 Project
9 Project
1) Write a program in Java to print the prime factors of a number n taken as input from the
user.
2) Define a class in a program to compute and print the square root, cube root, fourth root
and fifth root of numbers from 1 to 50.
3) Define a class and print the following pattern for some value of n which you need to take
as input .
Ex: n=4
1
121
12321
1234321
12321
121
1
4) Define a class and print the following pattern for some value of n which you need to take
as input .
Ex: n=4.
abcdcba
abc cba
ab ba
a a
ab ba
abc cba
abcdcba
7) Using a do-while loop, print all the palindrome numbers from 1 to 10,000.
8) Write a menu driven program taking n as input from the user. For n=
1- display all the even numbers from 1 to 1000
2- display all the odd numbers from 1 to 1000
3- display all the numbers which are divisible by 5
9) Write a program to take a number n as input. After taking the input, take n different
numbers as input from the user and find the product of all the numbers. Having found
the product, find the sum of the digits of the result.
10) Write a program to print the tables of all numbers from 11 to 20, each at a time. The
table should not exceed 10.
Ex: 12
Table:
12x1=12
12x2=24
…
12x9=108
12x10=120