Advertisement
WeltEnSTurm

Untitled

Dec 18th, 2010
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main(){
  4.     long double STEPS;
  5.     std::cin>>STEPS;
  6.     int prn[STEPS]={0};
  7.     int prn_c=0;
  8.     int cur=0;
  9.     for(int i=0;i<STEPS;i++){
  10.         cur++;
  11.         for(int j=0;j<cur;j++){
  12.             if(i%j!=0)
  13.                 break;
  14.             else
  15.                 prn[prn_c++]=i;
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement