|
2 | 2 |
|
3 | 3 | ## Write Java programs for the following:
|
4 | 4 |
|
5 |
| -1. Write a program to print factorial of a number, also take input. |
6 |
| -2. Write a program to print whether a number is even or odd, also take |
| 5 | +1. Write a program to print whether a number is even or odd, also take |
7 | 6 | input.
|
8 |
| -3. Take name as input and print a greeting message for that name. |
9 |
| -4. Write a program to input principle, time and rate (P, T, R) from user and |
| 7 | +2. Take name as input and print a greeting message for that name. |
| 8 | +3. Write a program to input principle, time and rate (P, T, R) from user and |
10 | 9 | find Simple Interest.
|
11 |
| -5. Take in two numbers and an operator (+, -, *, /) and calculate the value. |
| 10 | +4. Take in two numbers and an operator (+, -, *, /) and calculate the value. |
12 | 11 | (Use if conditions)
|
13 |
| -6. Take 2 numbers as input and print the largest number. |
14 |
| -7. Input a number and print all the factors of that number (use loops). |
15 |
| -8. Input currency in rupee and output in dollar. |
16 |
| -9. Take integer inputs till the user enters 0 and print the sum of all numbers |
| 12 | +5. Take 2 numbers as input and print the largest number. |
| 13 | +6. Input a number and print all the factors of that number (use loops). |
| 14 | +7. Input currency in rupee and output in dollar. |
| 15 | +8. Take integer inputs till the user enters 0 and print the sum of all numbers |
17 | 16 | (HINT: while loop)
|
18 |
| -10. Take integer inputs till the user enters 0 and print the largest number from |
19 |
| -all. |
| 17 | +9. Take integer inputs till the user enters 0 and print the largest number from |
| 18 | +all. |
0 commit comments