forked from alexprut/HackerRank
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSolution.java
More file actions
21 lines (17 loc) · 708 Bytes
/
Solution.java
File metadata and controls
21 lines (17 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Add {
public void add(int n1, int n2) {
System.out.println(n1+"+"+n2+"="+((int)(n1+n2)));
}
public void add(int n1, int n2, int n3) {
System.out.println(n1+"+"+n2+"+"+n3+"="+((int)(n1+n2+n3)));
}
public void add(int n1, int n2, int n3, int n4) {
System.out.println(n1+"+"+n2+"+"+n3+"+"+n4+"="+((int)(n1+n2+n3+n4)));
}
public void add(int n1, int n2, int n3, int n4, int n5) {
System.out.println(n1+"+"+n2+"+"+n3+"+"+n4+"+"+n5+"="+((int)(n1+n2+n3+n4+n5)));
}
public void add(int n1, int n2, int n3, int n4, int n5, int n6) {
System.out.println(n1+"+"+n2+"+"+n3+"+"+n4+"+"+n5+"+"+n6+"="+((int)(n1+n2+n3+n4+n5+n6)));
}
}