From 36442b348c3add6e46d65043dd847daebe5f7678 Mon Sep 17 00:00:00 2001 From: Muhammad Waleed Ahmad <115546135+MuhammadWaleed-0786@users.noreply.github.com> Date: Sun, 15 Oct 2023 01:08:36 +0500 Subject: [PATCH] Create ArrayExample.java Create ArrayExample.java --- ArrayExample.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ArrayExample.java diff --git a/ArrayExample.java b/ArrayExample.java new file mode 100644 index 00000000..7887c741 --- /dev/null +++ b/ArrayExample.java @@ -0,0 +1,14 @@ +import java.util.Scanner; + +public class SimpleCalculator { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + System.out.print("Enter first number: "); + double num1 = scanner.nextDouble(); + System.out.print("Enter second number: "); + double num2 = scanner.nextDouble(); + + double sum = num1 + num2; + System.out.println("Sum: " + sum); + } +}