We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ab8c2e commit 4c12af9Copy full SHA for 4c12af9
1 file changed
calculator.java
@@ -0,0 +1,14 @@
1
+import java.util.Scanner;
2
+
3
+public class calculator {
4
+ public static void main(String[] args) {
5
+ int num1, num2, sum;
6
+ Scanner input = new Scanner(System.in);
7
+ System.out.println("Enter first number: ");
8
+ num1 = input.nextInt();
9
+ System.out.println("Enter second number: ");
10
+ num2 = input.nextInt();
11
+ sum = num1 + num2;
12
+ System.out.println("Sum is: " + sum);
13
+ }
14
+}
0 commit comments