-
Notifications
You must be signed in to change notification settings - Fork 0
/
f.java
37 lines (34 loc) · 1.01 KB
/
f.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.util.*;
public class f {
// public static void main(String[] args) {
// int ans = sum2();
// System.out.println(ans);
// }
// static int sum2() {
// Scanner sc = new Scanner(System.in);
// System.out.println("enter no. 1= ");
// int num1 = sc.nextInt();
// System.out.println("enter no. 2= ");
// int num2 = sc.nextInt();
// sc.close();
// int sum = num1 + num2;
// // sc.close();
// return sum;
// }
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("enter n1 and n2= ");
int n1 = sc.nextInt();
int n2 = sc.nextInt();
//fun(n1, n2);
sc.close();
System.out.println(fun(n1, n2));
// varchi line comment out keli tr fun madhl return pn comment out karne ani fun
// chya aadhi void ghene int kholun
}
public static int fun(int n1, int n2) {
int sum = n1 + n2;
// System.out.println(sum);
return sum;
}
}