Prime Number Function (C++)
/* And now i'll share c++ functions : - a function to check wether a number is a prime or not - a function to print prime numbers in a certain range - a main function as usually c++ do */ int primecheck(int n) { int i; for (i=2; i<n; i++) { if (n % i == 0) return 0; } if(n>1) return 1; else return 0; } void primerange(int startx, int endx) { int z,col; for(z=startx;z<=endx;z++) { if (primecheck(z)==1) { cout<<z<<"\t"; col++;