fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. long square(long x) {
  5. if (x <= 2)
  6. return x;
  7. else
  8. return x * x;
  9. }
  10.  
  11. int main() {
  12. long i = 0;
  13. do {
  14. printf("%ld\n", square(i));
  15. i = i + 1;
  16. } while (5 - i);
  17. return 0;
  18. }
  19.  
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 9296KB
stdin
Standard input is empty
stdout
Standard output is empty