fork download
  1. #include <cstdio>
  2.  
  3. template <typename F>
  4. void repeat(unsigned n, F f)
  5. {
  6. while (n--) f();
  7. }
  8.  
  9. int main(int argc, const char *argv[])
  10. {
  11. repeat(10, []{puts("puts");});
  12. }
  13.  
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
puts
puts
puts
puts
puts
puts
puts
puts
puts
puts