Assignment - I

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Assignment I On Simple Java Concept

1. Write a program to take input for a date and check if it is a valid date.
2. WAP to find the roots of a quadratic equation. =

24
2

WAP to find sin(x) = x/1! x3/3! + x5/5! - ..


WAP to find first n Fibonacci series.
WAP to find the Greatest Common Divisor of two numbers.
WAP to display first 20 prime numbers.
WAP to find all divisors of a number.
WAP to check if a number is an Armstrong number. A number is an Armstrong number
if the sum of the cubes of the digits is equal to the number.
9. Find the sum of the sequence 1 1/2 + 1/3 1/4 + 1/5 -.
10. Find the sum of the sequence 2/9 5/13 + 8/17 +.
11. WAP to find 1 + 1/1! + 1/2! + 1/3! +..
12. WAP to reverse the digits of a number.
13. Write a recursive program to find GCD of two numbers.
14. Write a recursive program to find the power of x raised to y.
15. Write a recursive program to find the nth term of the Fibonacci series.
16. Write a program to search for a number in a list of numbers using binary search.
17. Write a program to sort a list of numbers using bubble sort.
18. Write a program to sort a list of numbers using insertion sort.
19. Write a program to sort a list of numbers using selection sort.
20. Write a program to convert a number in decimal to binary, hexadecimal and octal.
21. Write a program to find the sum, difference and product of two matrices.
22. Write a program to remove duplicates from an array.
23. An array contains marks obtained by students in a class test. The marks are between 0
and 100. Write a program to plot a Histogram.
24. Forty students were asked to rate the quality of food in the students cafeteria on a scale of
1 to 10. Place the 40 responses in an integer array and summarize the results of the poll.
25. Write a program to create an enumeration for the months of the year. The enumeration
should have fields to represent the days in the month (28 for Feb) and the season (like
winter for December).
3.
4.
5.
6.
7.
8.

Programs must be completed by the end of February, 2015.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy