#include<stdio.h>
#include<conio.h>
void main()
{
	int i=3,n,count,c;
	clrscr();
	printf("enter the number of prime number\n");
	scanf("%d",&n);
	if(n>=1)
	{
	  printf("prime number are\n",n);
	}
	for(count=2;count<=n;count++)
	{
	  for(c=2;c<=i-1;c++)
	  {
	    if(i%c==0)
	    {
	      break;
	    }
	  }
	  if(c==i)
	  {
	  printf("%d\n",i);
	  count;
	  }
	  i++;
	}
	i++;
	getch();
}

Output
enter the number of prime number
10
prime number are
3
5
7