fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int N;
  6. cin>>N;
  7. for (int i=2; i <= N; i+=3 ){
  8. cout<<i<< " ";
  9. }
  10. return 0;
  11. }
Success #stdin #stdout 0.01s 5280KB
stdin
15
stdout
2 5 8 11 14