Implement in a c program the following procedure to generate prime numbers from 1 to 100. This procedure is called…