Logic For Prime Number In C