Write a C Program to find Prime numbers between two Limits(Range)

By | October 10, 2016

C Program to find Prime numbers


Write a C program to print all Prime numbers between 1 to n using loop. C program to print all prime number within a given range. How to print all prime numbers between given interval using loop in C program.

Prime number program in c: c program for prime number, this code prints prime numbers using c programming language.

Prime number logic: a number is prime if it is divisible only by one and itself. Remember 2 is the only even and also the smallest prime number. First few prime numbers are 2, 3, 5, 7, 11, 13, 17….etc.

Prime numbers have many applications in computer science and mathematics. A number greater than one can be factorized into prime numbers, For example 540 = 22*33*5

Here the example to display prime numbers between lower and upper limit……..

Example:
Enter Lower limit: 1
Enter Upper limit: 10
Prime numbers between 1 – 10 :  2, 3, 5, 7


SOURCE CODE : :



OUTPUT : :


 

Leave a Reply