Вы находитесь на странице: 1из 4

1.

Print Series A fibonacci series is one in which the next term


is the sum of previous two terms
Ex: 0 1 1 2 3 5 8
2.

A tribonacci series is one in which the sum next term is


the sum of previous three terms
Ex: 0 1 2 3 6
11 20.

3.

2 -4 6 -8n terms

4.Print Series 1 12
5.

123

1234 n

Print Sum of Series 1+x+x2+x3+......+xn

6.Write a Java program to print the following pattern


ABCDE
BCDE
CDE
DE
E

*
**
***

54321
5432
543
54
5

1
12
123
1234
12345

* ***
***
* ***
***
* ***
***
* ***

11. Write a Program in Java to input a number and check whether it is


a Disarium Number or not.
A number will be called DISARIUM if sum of its digits powered with
their respective position is equal to the original number. Ex: 1 1+32+53 =
135

12. Write a program to input name of the customer, meter


number and number of electricity units for the electricity
usage and type of customer (I for Individual and C for
Commercial)and print name, meter number and final bill on
the screen based on the following criteria.
Number of units
Rate per unit
Rate per unit
(Individual)
(Commercial)
For first 200 units
1.20
5.0
Next 300 units
2.50
8.5
Above 500 units
10.00
12.0
Note: Each customer will be charged Rs. 100 as rentals in
addition to the bill amount. At the end service tax at
12.50% of the total bill should be calculated and printed.
13.A builder has announced festival discounts to the property buyers
based on the following criteria
Category
Discount on price
Discount on
development charge
Ground floor
10%
8%
First floor
0.0%
0.0%
Second floor
5%
5%
Third floor
7.5%
10%
Write a program to input price, development charge and the category
(G for ground floor, F for first floor, S for second floor, T for third
floor). Calculate and display the total discount, price of the flat after
deducting discount for 500 customers
14. Write a program in JAVA to find the Prime factors of a number.

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)

Вам также может понравиться