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;
  16. a=2;
  17. b=-3;
  18. printf("(%d+%d)^3=%d\n",a,b,cube(sum(a,b)));
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
(2+-3)^3=-1