From 2a84cc272736c7cf65babd877d436d1510ea7c79 Mon Sep 17 00:00:00 2001 From: fires Date: Sat, 28 Oct 2023 19:38:03 -0700 Subject: [PATCH] Finished Lab 006 --- .idea/misc.xml | 2 +- README.md | 3 ++- src/Lab006.java | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 src/Lab006.java diff --git a/.idea/misc.xml b/.idea/misc.xml index 7464918..f34ceba 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/README.md b/README.md index ae51dc5..166caba 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ In this README.md, answer the following question: -* What happens if you invoke a value method (i.e. a method that returns a result) and don't do anything with the returned result; that is, if you don't assign the returned result to a variable or use it as part of a larger expression? +* What happens if you invoke a value method (i.e. a method that returns a result) and don't do anything with the returned result; that is, if you don't assign the returned result to a variable or use it as part of a larger expression? You will get +* a error where the computer doesn't know what to read as the value for the method. ## PART 2 * Fork and clone this lab as you have done in all previous labs, and then complete the following: diff --git a/src/Lab006.java b/src/Lab006.java new file mode 100644 index 0000000..27f0fc5 --- /dev/null +++ b/src/Lab006.java @@ -0,0 +1,57 @@ +//Miaka LaRose 10/27 +import java.util.Scanner; + +/** + * class + */ +public class Lab006 { + + public static int n; + /** + * creating n + */ + public static int m; + /** + * creating m + */ + public static Scanner s = new Scanner(System.in); + /** + * allows user to input a value + */ + public Lab006(){ +int u = m; +int w = n; + + } + /** + * useless? + */ + + public static boolean isDivisible(){ + +if(m % n == 0 ){ + + return true; +}else{ + return false; +} + /** + * returns true or false baised on if n is divisible by m + * @return + */ + } + + /** + * + * @param args + */ + public static void main(String[] args){ + +System.out.println("Input any number of your choosing for the n"); + n = s.nextInt(); +System.out.println("Input any number of your choosing for the m"); + m = s.nextInt(); +System.out.print(isDivisible()); + } + +}