Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main(){
- long double STEPS;
- std::cin>>STEPS;
- int prn[STEPS]={0};
- int prn_c=0;
- int cur=0;
- for(int i=0;i<STEPS;i++){
- cur++;
- for(int j=0;j<cur;j++){
- if(i%j!=0)
- break;
- else
- prn[prn_c++]=i;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement