Using an array constructor and the WHERE statement, implement the following algorithm for finding prime numbers:
Print out all non-zero entries of the vector (the prime numbers).
Hint: the WHERE statement is an array assignment statement and not a control construct therefore it cannot contain a PRINT statement. The PACK intrinsic can accept an array argument and a conformable MASK and will return a 1D vector of all the elements of the array where the corresponding mask elements are .TRUE..
Print*, PACK(Array,Mask)