fork(1) download
  1. #include <stdio.h>
  2.  
  3. #define repeat(count) repeat_aux(count, __COUNTER__)
  4. #define repeat_aux(count, COUNTER) for(int _repeat_##COUNTER = 0; _repeat_##COUNTER < (count); _repeat_##COUNTER++)
  5.  
  6. int main() {
  7. repeat(2) {
  8. printf("hello xxx\n");
  9. repeat(3) {
  10. printf("hello\n");
  11. }
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
hello xxx
hello
hello
hello
hello xxx
hello
hello
hello