fork download
  1. #include <stdio.h>
  2.  
  3. int abs(int x){
  4. return (x > 0) ? x: -x;
  5. }
  6. int cube(int x){
  7. return x*x*x;
  8. }
  9. int main(void) {
  10. int a,b;
  11. a = -5;
  12. b = abs(cube(a));
  13. printf("%dの絶対値の三乗は%d", a, b);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
-5の絶対値の三乗は125