JAVA PROGRAMMING ASSIGNMENT -1
1. Input x and y calculate xy without using library function.
2. Input marks of three subjects calculate the total,percentage and grade as per following condition.
Per>=80 ‘A’
Per>=60 below 80 ‘B’
Per>=40 below 60 ‘C’
And below 40 ‘D’
3. Input a number check whether it is prime or not.
4. Input a number print the reverse order of it.
5. Input a number print the sum of its all digit.
6. Input a number print whether it is armstrong or not.
7. Input starting and ending number print the table of each number.
8. Input a number print whether it is special or not.(Note: sum of all factorial of its digit is equal to original
number.)ex: 145
9. Find sum of: 1+
10. Find sum of:
11. WAP TO Print 0 1 1 2 3 5 8 13 …………… (Fibonacci series)
12. WAP to show : x +
13. WAP to show:
1 1 0 1 1
12 22 01 23 12
123 333 011 456 123
1234 4444 0112 7 8 9 10 1234
01123
14. Input 10 numbers in a array print the following :- a) Print the sum of all elements .b)Print the largest from array .c)
Reverse in a Array. d)Input other search number find it is present or not.
15. Input a number print the equivalent binary number using an array.
16. Input a 3X3 number . print the following ---- A) sum of the each row. B) Sum of each column . C) sum of main
diagonal. D) sum of the second diagonal . E) Transpose form.
17. Input two 3x3 matrix print the following : A) Addition of two matrix . B) Multiplication of two both.
18. Pass ‘n’ number as command line arguments print the sum of all elements and print the largest no. from given ‘n’
number.
19. Passs ‘n’ number as command line arguments then print the all alternative numbers. Ex.: one two
three 5 a b c 10 and the output is : one three a c.
20. Create a class student it is having the following data members and member methods..---marks1, marks2, marks3
and getdata(), calculate result(), show result(). ?
21. Find Largest and Smallest Number in an Array using n elements?
22. Read Number from Console and Check if it is a Palindrome Number?
23. Input any name i.e RAJA RAM MOHAN ROY ,WAP TO Display R R M R. ?
24. CREATE package named complex ,to show the sum , product and subtraction of two complex number ,and import it
into another program.
25. Create interface for showing any mathematical formula using method names FORMULA,and use in other multiple
class?
26. WAP which accepts two strings from user and prints the alphabetically greater one..?
27. WAP to input any number,and write it in words.?
28. WAP to input any string ,to convert it into reverse form.? (ex: this is my book. And Output: book my is this).
29. WAP to check any input matrix is Magic or not.? (ex: sum of all row and coloumn are same.)
30. WAP to input any range between two number, and find the tables of that ranges ?
JP and DWD 5002
Shailendra Sir