Consider that there are two arrays A and B each of size 10. Array ‘A’ contains numbers with multiples of 5 of any range. Array ‘B’ contains numbers with multiples of 3 of any range. Write a PERL code to perform and display the following.
Add the numbers of Array ‘A’ and Array ‘B’ in each position and check whether the sum is a prime number or not.
List the positions in which the sum is prime and display in the web page
Create a matrix of values of Array ‘A’ (column 1), Array ‘B’ (column 2) and Sum of Array ‘A’ and Array ‘B' in each position (column 3).
Display the sum of common multiples of 3 and 5 from the array.
Add the numbers of Array ‘A’ and Array ‘B’ in each position and check whether the sum is a prime number or not.
List the positions in which the sum is prime and display in the web page
Create a matrix of values of Array ‘A’ (column 1), Array ‘B’ (column 2) and Sum of Array ‘A’ and Array ‘B' in each position (column 3).
Display the sum of common multiples of 3 and 5 from the array.
Comment