horsemanship世界
星期一, 6月 12, 2006
Lab14
public class recursive {
public static void main(String[] args) {
System.out.println(recursive(5));
}
public static int recursive (int i){
if(i==1) {
return (1);
}
else{
return (recursive(i-1)+i*i);
}}}
結果:
posted by 馬兒 at
8:42 下午
0 Comments:
張貼留言
<< Home
About
關於我自己
名稱:
馬兒
位置:
高雄市, Taiwan
檢視我的完整簡介
Previous
Homework8
Lab13
Lab12
Lab12 修改中
Lab11
Lab10
Homework8
Lab9
Homework7
Lab8
0 Comments:
張貼留言
<< Home