Skip to content

Commit d8f4005

Browse files
authored
Merge pull request ghostmkg#108 from mahirabidi12/main
CREATED THE THREE SUM PROGRAM BY USING JAVA
2 parents 0cca19f + 27f3e33 commit d8f4005

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ProgramForThreeSum.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import java.util.*;
2+
public class ProgramForThreeSum {
3+
public static void main(String[] args) {
4+
Scanner ttt = new Scanner(System.in);
5+
6+
//TAKING INPUTS FROM THE USER
7+
8+
int firstNumber = ttt.nextInt();
9+
int secondNumber = ttt.nextInt();
10+
int thirdNumber = ttt.nextInt();
11+
12+
//CALCULATING SUM
13+
int sum = firstNumber + secondNumber + thirdNumber;
14+
15+
//PRINTING SUM
16+
System.out.println(sum);
17+
ttt.close();
18+
}
19+
}

0 commit comments

Comments
 (0)