Solution: Finding Prime Numbers
Go over the implementation of finding prime numbers smaller than 20.
We'll cover the following...
We'll cover the following...
Solution
Explanation
Line 4: Initially,
flagis set totrueand every number is considered a prime number.Line 7: If the number has a divisor, then
flagis set tofalseto indicate that it is not a prime....