{"id":140483,"student_id":2002,"content":"setBackdrop('black');\nvar A = '?';\nvar B = '?';\nvar gcd = '?';\nvar lcm = '?';\n\nwhen('click', function () {\n var a = Number(prompt (\"第一個數字\"));\n var b = Number(prompt (\"第二個數字\"));\n A = a;\n B = b;\n while (true) {\n a \u003e b ? a -= b : b -= a;\n // if (a \u003e b) {\n // a -= b;\n // } else {\n // b -= a;\n // }\n if (a == 0 || b == 0) {\n break;\n }\n }\n a \u003e b ? gcd = a : gcd = b;\n // gcd = a \u003e b ? a : b;\n // if(a \u003e b) {\n // gcd = a;\n // }\n // if(b \u003e a) {\n // gcd = b;\n // }\n // gcd = a + b;\n lcm = A * B / gcd;\n});\n\nforever(function() {\n print('請點擊銀幕輸入!', 100, 50, 'white', 40);\n print('A: ' + A, 100, 150, 'white', 40);\n print('B: ' + B, 100, 200, 'white', 40);\n print('最大公因數: ' + gcd, 100, 250, 'white', 40);\n print('最小公倍數: ' + lcm, 100, 300, 'white', 40);\n});","created_at":"2020-04-12T14:33:39.135+08:00","updated_at":"2020-04-12T15:00:32.812+08:00","name":"輾轉相除法 副本","language":"javascript","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/140483/8eca9d2c533c75510e928a1de2abc5f4.jpg"},"parent_id":32561,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":44,"hashid":"zpesvzep","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
到這台電腦