PointerArray

Write a program that does the following using pointers: -asks the user for a number of elements that should be generated. Let’s call this number n (n >0 and n<100) -allocates space for n of integers -generates n random integers (0-1000) and store in the allocated space -prints out the number of stored elements that are divisible by 5 -deallocates the memoryThe sample run may look like the following> enter the number of elements> 10> No of elements divisible by 5 is 3

×
New Download