{"id":87192,"student_id":1976,"content":"// function eds(a1, d, n) {\n// var result\n// result = a1 + d * (n-1)\n// return result\n \n// }\n\n// function ers(a1, r, n) {\n// var result = a1\n// for(var i=0;i\u003cn-1;i++) {\n// result *= r \n// }\n \n// return result\n// }\n\n// console.log(ers(2, 2, 10)) // 1024\n\n// function loop(n) {\n// if( n == 1) {\n// return 1\n// } else {\n// return n + loop(n-1) \n// }\n// }\n\nfunction fib(num) {\n if(num == 1) {\n return 1\n } else if(num == 2) {\n return 2\n } else {\n return fib(num-1) + fib(num-2)\n }\n}\n\n\n// function fib(num) {\n// var result\n// var a1 = 1;\n// var a2 = 2; \n// if(num == 1) {\n// return a1\n// }\n// if(num == 2) {\n// return a2\n// }\n// for(var i = 2; i \u003c num;i++) {\n// result = a1 + a2\n// if(i % 2 == 0) {\n// a1 = result\n// } else {\n// a2 = result\n// }\n// }\n// return result\n// } \ncount = fib(time)\n\n\n\n\n","created_at":"2019-08-04T09:53:43.254+08:00","updated_at":"2019-11-12T07:31:25.277+08:00","name":"兔子生兔子 副本","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/87192/ab80d8319fe3800c03b592c1f7815d76.jpg"},"parent_id":32568,"plugin":"setBackdrop(\"black\");\nvar time = prompt(\"經過幾個月?\", \"0\");\n\nfunction fib (c) {\n}\n\nvar count = fib(time);\nforever(function(){\n print(`經過 ${time} 個月`, 50, 180, 'white', 50);\n print(`總共有 ${count} 隻兔子`, 50, 260, 'white', 50);\n});","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":384,"hashid":"yeysm2jz","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦