请问return在这里是什么意思呢??
public static int square(int n)
// post: returns the square of the value n
{
return n*n;
}
参考答案:对传入参数返回其平方,比如 int a = square(5);那么该函数就把其返回值5×5也就是25赋给了a。
public static int square(int n)
// post: returns the square of the value n
{
return n*n;
}
参考答案:对传入参数返回其平方,比如 int a = square(5);那么该函数就把其返回值5×5也就是25赋给了a。