forked from baderbarbarawi/java-addTwoNumbers
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddTwoNumbers.java
More file actions
Latest commit
24 lines (17 loc) · 586 Bytes
/
Copy pathAddTwoNumbers.java
File metadata and controls
24 lines (17 loc) · 586 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// add two number
importjava.util.Scanner;
publicclassAddTwoNumbers {
privatestaticScannersc;
publicstaticvoidmain(String[] args) {
doubletotal = 0;
intnummer1,nummer2;
sc = newScanner(System.in);
System.out.println("Geben Sie eine Nummer ein ");
nummer1= sc.nextInt();
System.out.println("Geben sie noch eine Nummer ein ");
nummer2= sc.nextInt();
System.out.println("AddTwoNumbers");
total = nummer1 + nummer2;
System.out.print("Der Summe von ("+ nummer1 + " + " + nummer2 + ") ist = " + total);
}
}