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