标签:lse system main 计算 方法 out round back else
public static void main(String[] args) {
System.out.println("计算结果为:" + sum(100));
}
public static int sum(int num) {
if (num == 1) {
return 1;
} else {
return num + sum(num - 1);
}
}
标签:lse system main 计算 方法 out round back else
原文地址:https://www.cnblogs.com/wangffeng293/p/13259994.html