I'm making an prime number code which should print all the prime numbers for example:
1
3
5
7
11
....
all prime numbers from 1 to 100 but there are alot of problems in my code can someone correct them please thanks!
> Bro can you please explain how this code is working??
> A prime number can be divided, without a remainder, only by itself and by 1. For example, 17 can be divided only by 17 and 1
A prime number only has two factors. You count the number of factors for each number and check if the number of factors for the number you are progressing is exactly 2, then the number is a prime number.