diff --git a/src/main/java/Unit4/U4_L1_5_Activity_One.java b/src/main/java/Unit4/U4_L1_5_Activity_One.java new file mode 100644 index 0000000..101d8ee --- /dev/null +++ b/src/main/java/Unit4/U4_L1_5_Activity_One.java @@ -0,0 +1,21 @@ +/* Lesson 1 1/2 Coding Activity Question 1 */ +package Unit4; + +import java.util.Scanner; + +public class U4_L1_5_Activity_One +{ + public static void main(String[] args) + { + + Scanner scan = new Scanner(System.in); + int num = scan.nextInt(); + int fac = 1; + while(fac <= 5){ + System.out.println(num*fac); + fac++; + } + + scan.close(); + } +} \ No newline at end of file diff --git a/src/main/java/Unit4/U4_L1_5_Activity_Two.java b/src/main/java/Unit4/U4_L1_5_Activity_Two.java new file mode 100644 index 0000000..3a0644b --- /dev/null +++ b/src/main/java/Unit4/U4_L1_5_Activity_Two.java @@ -0,0 +1,20 @@ +package Unit4; + +import java.util.Scanner; + +public class U4_L1_5_Activity_Two { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + int n=scanner.nextInt(); + int index=0; + int sum=0; + while (index