Think in Java第四章练习题
2020-12-13 06:13
标签:png exe for system else 出错 string str out 代码如下: Think in Java第四章练习题 标签:png exe for system else 出错 string str out 原文地址:https://www.cnblogs.com/yyslif/p/11172242.htmlpackage cn.thinkinjava.yys;
public class Exercise9 {
public static int num(int n) {
if(n == 1){
return 1;
}
if (n == 2) {
return 1;
}else{
return num(n - 1) + num(n - 2);
}
}
public static void main(String[] args) {
int i = Integer.parseInt(args[0]);
System.out.println("First"+i+"Fibonacci number(s):");
for (int j = 0; j System.out.println(num(j));
}
}
}
运行一直出错