Exercise D(c) | Prime numbers using Sieve Algorithm in C
Duration: 22:30 Min | Sep 10, 2023
Step 1 Fill an array num[100] with numbers from 1 to 100
Step 2 Starting with the second entry in the array, set all its multiples to zero.
Step 3 Proceed to the next non-zero element and set all its multiples to zero.
Step 4 Repeat step 3 till you have set up the multiples of all the non-zero elements to zero
Step 5 At the conclusion of step 4, all the non-zero entries left in the array would be prime numbers, so print out these numbers.