/********************************************* * TABLE OF PRIME NUMBERS * * ------------------------------------------ * * This small program writes a table of prime * * numbers from 1 to N (here N=2000). * * ------------------------------------------ * * * * C++ version by J-P Moreau. * * (www.jpmoreau.fr) * *********************************************/ #include void main() { int i, j, m, N, prem, Premier[400], Raye[2001]; N = 2000; for(i=0; i N) || (Raye[prem]==0)) break; } while(1); i = 2*prem; while (i<=N) { Raye[i] = 1; i = i + prem; } } j = 0; for (i=1; i