I want to print the first 10000 prime numbers. Can anyone give me the most efficient code for this? Clarifications:
Here the code that I made :
enter code here
#include
#include
#include
#include
#include
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT*/
unsigned long int n;
int prime(unsigned long int);
scanf("%ld",&n);
unsigned long int val;
for(unsigned long int i=0;i