main.cs570 chars27 lines
This code uses a nested loop to iterate over every number between 2 and 1000. For each number, it checks if it is prime by seeing if it is evenly divisible by any number between 2 and the square root of the number. If the number is prime, it increments a counter. Finally, it outputs the total count of prime numbers.
gistlibby LogSnag