用递归算法写5!+7!+9!
收起
知与谁同
2018-07-15 18:04:38
1814
0
1
条回答
写回答
取消
提交回答
-
import java.util*.
int function ( int n)
{
if (n == 1), return 1;
return n * function (n-1);
}
public static void main(String[] args)
(
int a = 3, b = 5, c = 7;
system.out.println(function a);
system.out.println(function b);
system.out.println(function c);
}
2019-07-17 22:54:31