Find and print all the elements of the array. For prime elements, print its power of M (prime numbers are numbers that have exactly two factors, 1 and itself).
Below is an example:
Enter N = 7; array = {2, -2, 8, 0, 7, 9, 20); M = 3
7
2-2807 9 20
3
OUTPUT:
8-280343 9 20
Press any key to continue
Question 9:
(1 mark, file to be edited: Q9.c)
The program requires the user to enter a list of product names in a store. Each product name is separated by a space.
Continue entering the name of a product to search.
Zoom
+ 100%
Close