関数呼び出しと変数 関数main() int x,y; … x = 1; y = func1(x); x = x + y; x 10 1 y 9 返す値の型:int int x; … a = a + 2; x = a * a; func2(a); return x; 関数func2(int a) 返す値の型:void double b,c; 関数func1(int a) a 3 b 1.73205… b = sqrt(a); c 4.73205… c = a + b; printf("%d,%f,%f\n",a,b,c); a 31 x 9
© Copyright 2024 ExpyDoc