I am using this following code to find 10001th prime number but it is not running.
I am using devc++, but when I run this code, a blank screen comes up.
This is my Code:
#include<iostream>
#include<conio.h>
using namespace std;
int prime(int a)
{
    int p=0;
    for(int j=2;j<=a/2,p<=0;j++)
    {
        if(a%j==0)
        {
            p++;
        }
    }
    if(p==0)
    {
        return 1;
    }
    else
    return 0;
}
int main()    
{
    int i,c=0;
    for(i=2;c<=10001;i++)
    {
        if(prime(1))
        {
            c++;
        }
    }
    cout<<i;
    return 0;
}
 
     
     
     
    