C Program to print prime numbers between n1 and n2 where n1 and n2 are user inputs
#include<stdio .h="">
#include<conio .h="">
void main()
{
int n1,n2,i,j;
clrscr();
printf("\nEnter the numbers:");
scanf("%d%d",&n1,&n2);
printf("\nPrime Numbers:");
for(i=n1;i<=n2;i++)
{
for(j=2;i<=i;j++)
{
if(i%j==0)
break;
}
if(j==i)
printf("\n%d",i);
}
getch();
}
***********OUTPUT**************
Enter the numbers:1
10
Prime Numbers:
2
3
5
7</conio></stdio>