diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..1df4412 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "intelliSenseMode": "msvc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/Solutions/10001st_prime.cpp b/Solutions/10001st_prime.cpp new file mode 100644 index 0000000..7d550b6 --- /dev/null +++ b/Solutions/10001st_prime.cpp @@ -0,0 +1,26 @@ +#include +using namespace std; +int main() +{ + int i=1,n,prime=2,count,flag,nprime; + cin>>n; + while(i<=n) + { + flag=1; + for(count=2;count<=prime-1;count++) + { + if(prime%count==0) + { + flag=0; + break; + } + } + if(flag==1) + { + nprime=prime; + i++; + } + prime++; + } + cout<