diff --git a/week1/day2/assignments/mandatory/FindIntersection.java b/week1/day2/assignments/mandatory/FindIntersection.java index a0c1e90..d3cd8c3 100644 --- a/week1/day2/assignments/mandatory/FindIntersection.java +++ b/week1/day2/assignments/mandatory/FindIntersection.java @@ -1,7 +1,6 @@ package week1.day2.assignments.mandatory; public class FindIntersection { - /* * Pseudo Code @@ -10,8 +9,28 @@ public class FindIntersection { * c) Declare for loop iterator from 0 to array length * d) Declare a nested for another array from 0 to array length * e) Compare Both the arrays using a condition statement - - * f) Print the first array (shoud match item in both arrays) + * f) Print the first array (should match item in both arrays) */ + public static void main(String[] args) { + + + //a) Declare An array for {3,2,11,4,6,7} + int[] arr = {3,2,11,4,6,7}; + + //b) Declare another array for {1,2,8,4,9,7} + int[] arry= {1,2,8,4,9,7}; + //c) Declare for loop iterator from 0 to array length + for(int i=0;i