All pastes #454045 Raw Edit

Nexk

public cpp v1 · immutable
·published 2007-04-23 11:24 UTC
rendered paste body
#include <iostream.h>#include <stdlib.h>int main(){      int zakres = 1000;      int tab[zakres];      int i;      tab[0] = 0;      tab[1] = 0;      tab[2] = 1;      for (i=2;i<zakres;i++)          {           int m=2;           while(i*m <=zakres)           {             int pomoc = i*m;             tab[pomoc] = 0;             m++;           }          }      for (i=2;i<zakres;i++)          {            if(tab[i] != 0)            cout << i << endl;          }      system("PAUSE");      return 0;}