From f6c50b68ff638b6d0c6fa45ebacb8f426f39523e Mon Sep 17 00:00:00 2001 From: 101zh <67253838+101zh@users.noreply.github.com> Date: Sat, 14 Oct 2023 22:14:14 +0000 Subject: [PATCH] feat(3.5.1): Finished U3_L5_Activity_One --- src/main/java/Unit3/U3_L5_Activity_One.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/main/java/Unit3/U3_L5_Activity_One.java diff --git a/src/main/java/Unit3/U3_L5_Activity_One.java b/src/main/java/Unit3/U3_L5_Activity_One.java new file mode 100644 index 0000000..5e4a60f --- /dev/null +++ b/src/main/java/Unit3/U3_L5_Activity_One.java @@ -0,0 +1,18 @@ +/* Lesson 5 Coding Activity Question 1 */ +package Unit3; +import java.util.Scanner; + +public class U3_L5_Activity_One { + public static void main(String[] args) { + + Scanner scan = new Scanner(System.in); + System.out.println("Enter 2 integers:"); + int x = scan.nextInt(); + double y = scan.nextDouble(); + double ratio = x / y; + if (ratio <= 8 && ratio > 1) + System.out.println("Ratio OK"); + + scan.close(); + } +}