From d7990a02a2ca7947c618760165c93b68694390a4 Mon Sep 17 00:00:00 2001 From: 101zh <67253838+101zh@users.noreply.github.com> Date: Mon, 9 Oct 2023 20:39:45 +0000 Subject: [PATCH] feat(3.2.2): Finished U3_L2_Activity_Two --- .vscode/launch.json | 7 +++++++ src/main/java/Unit3/U3_L2_Activity_Two.java | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/main/java/Unit3/U3_L2_Activity_Two.java diff --git a/.vscode/launch.json b/.vscode/launch.json index ae6fb83..226f19b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,5 +1,12 @@ { "configurations": [ + { + "type": "java", + "name": "U3_L2_Activity_Two", + "request": "launch", + "mainClass": "Unit3.U3_L2_Activity_Two", + "projectName": "my-app" + }, { "type": "java", "name": "U3_L2_Activity_One", diff --git a/src/main/java/Unit3/U3_L2_Activity_Two.java b/src/main/java/Unit3/U3_L2_Activity_Two.java new file mode 100644 index 0000000..169b171 --- /dev/null +++ b/src/main/java/Unit3/U3_L2_Activity_Two.java @@ -0,0 +1,21 @@ +package Unit3; + +import java.util.Scanner; + +public class U3_L2_Activity_Two { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + double num1 = scanner.nextDouble(); + double num2 = scanner.nextDouble(); + + if (num1 > num2) { + System.out.println(num1); + } else { + System.out.println(num2); + } + // System.out.println(Math.min(num1, num2)); + + scanner.close(); + } +}