fork download
  1. #include <stdio.h>
  2. int sum(int m, int n) {
  3. return m + n;
  4. }
  5.  
  6. int func(int n) {
  7. if (n < 0) {
  8. n = -n;
  9. }
  10. return n;
  11. }
  12.  
  13. int main(void) {
  14. int l, m = -2, n = 3;
  15. l = sum(func(m), func(n));
  16. printf("%dの絶対値と%dの絶対値の和は%d\n", m, n, l);
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
-2の絶対値と3の絶対値の和は5