fork download
  1. #include <stdio.h>
  2.  
  3. //二つの値の和を返す関数
  4. int sum(int x, int y){
  5. return x+y;
  6. }
  7.  
  8. //引数の三乗の値を返す関数
  9. int cube(int x){
  10. return x*x*x;
  11. }
  12.  
  13. //main関数
  14. int main(void) {
  15. int a,b,c;
  16. a=2;
  17. b=-3;
  18. c=cube(sum(a,b));
  19. printf("(%d,%d)^3=%d",a,b,c);
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5272KB
stdin
Standard input is empty
stdout
(2,-3)^3=-1