0% found this document useful (0 votes)
29 views1 page

Java Assignment-1 Setwise

DASDDAWDD

Uploaded by

Siddhartha Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views1 page

Java Assignment-1 Setwise

DASDDAWDD

Uploaded by

Siddhartha Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Note: Each set being 10 marks each.All assignments are 10 marks each.

Question Set no. Even/Odd


1 Even roll no
2 1
3
4 Odd roll no
5 2
6

Question 1
Write a Java program to find the factorial of a number.

Question 2
Write a java program with the initialization earning of an employee. The program should
calculate the income tax to be paid by the employee as per the criteria given below:
Slab rate IT rate
Upto Rs. 50,000 Nil
Upto Rs. 60,000 10% on additional amount
Upto Rs. 1,50,000 20% on additional amount
Above Rs. 1,50,000 30% on the additional amount
Hint: - Run: - java calculates 1,25,000

Question 3
Write a program to input n numbers on command line arguments and calculate the maximum of
them.

Question 4
Write a program to print the sum and average of the even and odd numbers separately given on
command line argument.

Question 5
Write a program to print the following pattern given n as argument:- [for input 3]

1
2 2
3 3 3

Question 6
Write a program to print all the prime numbers in an array of n elements by taking command line
arguments.

You might also like