hey can anyone help me with this program, I've been trying to figure it but i haven't been able to understand it:
An integer is said to be prime if it is divisible only by 1 and itself.
a. write a function that determines if a number is prime. Send in a number that you will be testing. Return 1 if it is prime, 0 if it is not.
b. Use this function in a program that determines and prints all the prime numbers between 1 and 10,000.
i did this code but i don't know what to do after that or if its even right so far:
You should assume at first that it is prime, then you should go through and check every number between and including 2 and its square root to see if they go into the number without a remainder. If there is a remainder you immediately know it is not prime and can stop checking for factors. After all factors have been checked, you know that it is actually prime.