fork download
  1. #include<stdio.h>
  2.  
  3. int main(){
  4. int in;
  5. scanf("%d", &in);
  6. for (int i = 1; i <= in; i++) {
  7. if (i % 4 == 0) printf("PUM\n");
  8. else printf("%d ", i);
  9. }
  10. }
  11.  
  12. //https://pt.stackoverflow.com/q/138471/101
Success #stdin #stdout 0s 4540KB
stdin
28
stdout
1 2 3 PUM
5 6 7 PUM
9 10 11 PUM
13 14 15 PUM
17 18 19 PUM
21 22 23 PUM
25 26 27 PUM