Skip to content

Commit 288b6d9

Browse files
authored
Update 2-first-java.md
1 parent da71f5b commit 288b6d9

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

assignments/2-first-java.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@
22

33
## Write Java programs for the following:
44

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
76
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
109
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.
1211
(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
1716
(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

Comments
 (0)