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