From 3a296d108322ee5f3f0e997de1dc3bfb5db2d328 Mon Sep 17 00:00:00 2001 From: 101zh <67253838+101zh@users.noreply.github.com> Date: Mon, 9 Oct 2023 20:53:06 +0000 Subject: [PATCH] feat(3.2.4): Finished U3_L2_Activity_Four --- .vscode/launch.json | 7 +++++++ src/main/java/Unit3/U3_L2_Activity_Four.java | 21 ++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/main/java/Unit3/U3_L2_Activity_Four.java diff --git a/.vscode/launch.json b/.vscode/launch.json index ce12109..4f2a6a3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,5 +1,12 @@ { "configurations": [ + { + "type": "java", + "name": "U3_L2_Activity_Four", + "request": "launch", + "mainClass": "Unit3.U3_L2_Activity_Four", + "projectName": "my-app" + }, { "type": "java", "name": "U3_L2_Activity_Three", diff --git a/src/main/java/Unit3/U3_L2_Activity_Four.java b/src/main/java/Unit3/U3_L2_Activity_Four.java new file mode 100644 index 0000000..48b97a7 --- /dev/null +++ b/src/main/java/Unit3/U3_L2_Activity_Four.java @@ -0,0 +1,21 @@ +package Unit3; + +import java.util.Scanner; + +public class U3_L2_Activity_Four { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + System.out.println("Enter two test values"); + double test1 = scanner.nextDouble(); + double test2 = scanner.nextDouble(); + + if (!(test1 <= 100.0 && test1 >= 0.0)) + System.out.println("Not Valid"); + if (!(test2 <= 100.0 && test1 >= 0.0)) + System.out.println("Not Valid"); + + scanner.close(); + + } +}