diff --git a/output-below-amount/outputBelowAmount.java b/output-below-amount/outputBelowAmount.java new file mode 100644 index 0000000..947da6f --- /dev/null +++ b/output-below-amount/outputBelowAmount.java @@ -0,0 +1,53 @@ +import java.util.Scanner; +/* + * Get list of ints + * first number is number of ints, never above 20 + * print out all ints that are <= to last int + * + * input: 5 50 60 140 200 75 100 + * + * output: 50 60 75 + * for simplicity, all numbers should be followed by a space + * even the last one + * + * Use two methods: + * + * public static void getUserValues(int[] myArr, int arrSize, Scanner scnr) + * + * public static void outputIntsLessThanOrEqualToThreshold + * (int[] userValues, int userValsSize, int upperThreshold) + */ + +public class outputBelowAmount{ + + public static void getUserValues(int[] myArr, int arrSize, Scanner scnr){ + + for (int i=0;i