You are on page 1of 6

CLASS –IX

COMPUTER APPLICATIONS

PROJECT ASSIGNMENT

Question 1

Write a program to input a number and evaluate the results based on the number entered by the user:
(a) Natural logarithm of the number
(b) Absolute value of the number
(c) Square root of the number
(d) Cube of the number
(e) Random numbers between 0 (zero) and 1 (one).

Question 2

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


Area = (22/7) * r 2; 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.

Question 3

Write a program to input three angles of a triangle and check whether a triangle is possible or not. If
possible then check whether it is an acute-angled triangle, right-angled or an obtuse-angled triangle
otherwise, display 'Triangle not possible'.
Sample Input: Enter three angles: 40, 50, 90
Sample Output: Right=angled Triangle

Question 4

Write a program to input the cost price and the selling price of an article. If the selling price is more
than the cost price then calculate and display actual profit and profit per cent otherwise, calculate and
display actual loss and loss per cent. If the cost price and the selling price are equal, the program
displays the message 'Neither profit nor loss'.

Question 5

Write a program to input three numbers and check whether they are equal or not. If they are unequal
numbers then display the greatest among them otherwise, display the message 'All the numbers are
equal'.
Sample Input: 34, 87, 61
Sample Output: Greatest number: 87
Sample Input: 81, 81, 81
Sample Output: All the numbers are equal.

Question 6

Write a program to accept a number and check whether the number is divisible by 3 as well as 5.
Otherwise, decide:
(a) Is the number divisible by 3 and not by 5?
(b) Is the number divisible by 5 and not by 3?
(c) Is the number neither divisible by 3 nor by 5?
The program displays the message accordingly.

Question 7

Write a program to input year and check whether it is:


(a) a Leap year (b) a Century Leap year (c) a Century year but not a Leap year
Sample Input: 2000
Sample Output: It is a Century Leap Year.

Question 8

Write a program to input two unequal positive numbers and check whether they are perfect square
numbers or not. If the user enters a negative number then the program displays the message 'Square
root of a negative number can't be determined'.
Sample Input: 81, 100
Sample Output: They are perfect square numbers.
Sample Input: 225, 99
Sample Output: 225 is a perfect square number.
99 is not a perfect square number.

Question 9

Write a program to input three unequal numbers. Display the greatest and the smallest number.
Sample Input: 28, 98, 56
Sample Output: Greatest Number: 98
Smallest Number: 28

Question 10

A cloth showroom has announced festival discounts and the gifts on the purchase of items, based on the
total cost as given below:

Total Cost Discount Gift

Up to ₹ 2,000 5% Calculator

₹ 2,001 to ₹ 5,000 10% School Bag

₹ 5,001 to ₹ 10,000 15% Wall Clock

Above ₹ 10,000 20% Wrist Watch

Write a program to input the total cost. Compute and display the amount to be paid by the customer
along with the gift.
Question 11

An employee wants to deposit certain sum of money under 'Term Deposit' scheme in Syndicate Bank.
The bank has provided the tariff of the scheme, which is given below:

No. of Days Rate of Interest

Up to 180 days 5.5%

181 to 364 days 7.5%

Exact 365 days 9.0%

More than 365 days 8.5%

Write a program to calculate the maturity amount taking the sum and number of days as inputs.

Question 12

The volume of solids, viz. cuboid, cylinder and cone can be calculated by the formula:

1. Volume of a cuboid (v = l*b*h)


2. Volume of a cylinder (v = π*r 2 *h)
3. Volume of a cone (v = (1/3)*π*r 2*h)

Using a switch case statement, write a program to find the volume of different solids by taking suitable
variables and data types.

Question 13

Write a program to input any 50 numbers (including positive and negative).


Perform the following tasks:
(a) Count the positive numbers
(b) Count the negative numbers
(c) Sum of positive numbers
(d) Sum of negative numbers

Question 14

Write a program to display all the numbers between m and n input from the keyboard (where m<n,
m>0, n>0), check and print the numbers that are perfect square. e.g. 25, 36, 49, are said to be perfect
square numbers.

Question 15

Write a program to input a number and display the new number after reversing the digits of the original
number. The program also displays the absolute difference between the original number and the
reversed number.
Sample Input: 194
Sample Output: 491
Absolute Difference= 29

Question 16

Write a program in Java to find the sum of the given series :

(a) S = a2 + a2 / 2 + a2 / 3 + ...... + a2 / 10

(b) S = a + a2 / 2 + a3 / 3 + ...... + a10 / 10

(c) S = (a*2) + (a*3) + ...... + (a*20)

(d) S = a + a2 + a3 + ...... + an

Question 17

Write a menu driven program to perform the following tasks by using Switch case statement:
(a) To print the series:
0, 3, 8, 15, 24, ............ to n terms. (value of 'n' is to be an input by the user)
(b) To find the sum of the series:
S = (1/2) + (3/4) + (5/6) + (7/8) + ........... + (19/20)

Question 18

Write two separate programs to generate the following patterns using iteration (loop) statements:

(a)

*
* #
* # *
* # * #
* # * # *

(b)

54321
5432
543
54
5

Question 19

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.
Question 20

Write the programs in Java to display the following patterns:

(a)

1
21
321
4321
54321

(b)

54321
5432
543
54
5

(c)

99999
77777
55555
33333
11111

(d)

1
23
456
7 8 9 10
11 12 13 14 15

You might also like