I am stuck on this problem that I am trying to solve in this book tha I am reading on C programming. I am new to C and I could use some help to understand how to solve this ....thanks in advance.
The problem has these requirements.
1. Prompt user for a limit.
2. start from 1.....limit.
3. for each number test to see if it retruns a remainder
from dividing by 2...3...4...5...until half of the number.
4. if after any division ...it returns a 0 remainder....skip it
5. otherwise print it as a prime number.
This probably seems very simple to most of you but I have a headache from thinking about it for so long.
I have so far :
printf("Enter your Limit:");
for(j = 1;j<(i/2);j++)
if((i % j) != 0)
printf("\n%d is prime",i);