public static double calculate(double r)
{
double x;
double y;
x = r * r;
y = r * r * r;
return x; // should i put something here or shuld i do somehow array?
}
答案 0 :(得分:2)
使用参数
double in1, in2;
double result = calculate(10, out in1, out in2);
public static double calculate(double r, out double x, out double y)
{
x = r * r;
y = r * r * r;
return x;
}