#include<iostream> using namespace std; int main() { int a,j=2,c=0; cin>>a; for(int i=2;i<(a*a);i++) { for( j=2;j<i;j++)> { if(i%j==0) break; } if(i==j) { c++; if(c==a) { cout<<i; return 0; } } } return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)