From a595fda8ef4cd7d90713b089ea4f2f1afa9923b1 Mon Sep 17 00:00:00 2001 From: 101zh <67253838+101zh@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:02:42 +0000 Subject: [PATCH] feat(3.1.4): Finished U3_L1_Activity_Four --- src/main/java/Unit3/U3_L1_Activity_Four.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/java/Unit3/U3_L1_Activity_Four.java diff --git a/src/main/java/Unit3/U3_L1_Activity_Four.java b/src/main/java/Unit3/U3_L1_Activity_Four.java new file mode 100644 index 0000000..8ec7a4b --- /dev/null +++ b/src/main/java/Unit3/U3_L1_Activity_Four.java @@ -0,0 +1,19 @@ +package Unit3; + +import java.util.Scanner; + +public class U3_L1_Activity_Four { + public static void main(String[] args){ + Scanner scan = new Scanner(System.in); + System.out.println("Please Enter an Integer:"); + int x = scan.nextInt(); + if (x%2==0) { + System.out.println("Divisible by 2!"); + } + if (x%3==0) { + System.out.println("Divisible by 3!"); + } + scan.close(); + + } +} \ No newline at end of file