1. (PrimeNumbers) An integer is said to be prime if it is divisible by only 1 and itself. For example, 2, 3, 5 and 7 are prime, but 4, 6, 8 and 9 are not.

a. Write a function that determines whether a number is prime.

b. Use this function in a program that determines all the prime numbers between 1 and 1000. Store the results in an array and print them in a neat table format.


halo guys. can you help me with this program.
I have my code it really display a prime a number but it didnt follow what the instruction.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.