You are on page 1of 4

Grade 9 Term2 Computer Project Questions(AY 23-24)

1) Write a program to display the given output:

5
54
543
5432
54321

2)Write a program to display the given output:

A
BB
CCC
DDDD
EEEEE

3) Write a program in Java to input three numbers and display the greatest and the
smallest of the two numbers.
Hint: Use Math.min( ) and Math.max( )
Sample Input: 87, 65, 34
Sample Output: Greatest Number 87
Smallest number 34

4) You want to calculate the radius of a circle by using the formula:


Area = (22/7) * r2; where r = radius of a circle
Hence the radius can be calculated as:
r = √((7 * area) / 22)
Write a program in Java to calculate and display the radius of a circle by taking
area as an input.

5) Write a program to input the time in seconds. Display the time after converting
them into hours, minutes and seconds.
Sample Input: Time in seconds 5420
Sample Output: 1 Hour 30 Minutes 20 Seconds
6) In an examination, you have appeared for three subjects i.e. Physics, Chemistry
and Biology. Write a program in Java to calculate the average mark obtained and
finally display the marks in rounded-off form.
Take Physics, Chemistry. and Biology marks as inputs.

7) Write a program in Java to calculate and display the hypotenuse of a Right-


Angled Triangle by taking perpendicular and base as inputs.
Hint: h = √p2 + b2

8) Write a program to input a number and evaluate the results based on the
number entered by the user:
(a) Absolute value of the number
(b) Square root of the number
(c) Cube of the number

9) Write a program to input a number and check whether the number is an


Armstrong number. A number is said to be an Armstrong number if it is equal to
the sum of the cubes of its digits. For example: 153= 13 + 53 + 33 =153

10) Write a program to display the below pattern:

*
*#
*#*
*#*#
*#*#*
11) Write a menu driven program to display all prime and non-prime numbers from 1
to 100. Enter 1: to display all prime numbers Enter 2: to display all non-prime
numbers Hint: A number is said to be prime if it is only divisible by 1 and the
number itself.

12) Print the series:


(1/2) + (1/3) + (1/5) + (1/7) + (1/11) + .......... + (1/29)
13) Write a program to input 10 integers and find the sum of the prime numbers
only.

14) Write a program to generate all perfect numbers between 1 and 100.
15) Write a program to generate all 3 digit palindrome numbers.
16) Write a program to input a number and check whether it is a magic number or
not. If you iterate the process of summing the squares of the decimal digits of the
number, and if this process terminates in 1, then the original number is called a
magic number. For example, 55=>(5+5)=10=>(1+0)=1.

17) Write a program to input 10 integers and find the sum of the prime numbers
only.

18) Write a program to generate all perfect numbers between 1 and 100.

19) Print the series:


1 + (1+2) + (1+2+3) + .......... + (1+2+3+ .. + n)

20) Write a program to find the sum of the following series.

S = (a/2!) - (a/3!) + (a/4!) - (a/5!) + ....... + (a/10!)


Sample -1 Acknowledgements

I would like to thank my Computer teacher Ms.Neelima Vadnere for giving me the
opportunity to make this project. While making this project, I learned new things
about programming in Java.

I would like to thank my parents who helped me in the completion of this project
on time and aided me in presenting it in a neat manner.

Finally, I would like to thank my school, Vibgyor High Magarpatta, for providing
me with proper education and enabling me with the necessary facilities for
learning Computer Applications.

You might also like