fork download
  1. #include <stdio.h>
  2. //練習問題A func(n);
  3. int func(int n){
  4. n=-n;
  5. return n;
  6. }
  7. int main(void) {
  8. int n, m = -4;
  9. n = func(m);
  10. printf("%dの絶対値は%d\n", m,n);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
-4の絶対値は4