看板 NTUBSE-B-98 關於我們 聯絡資訊
原文補上 5.24 An integer is said to be prime if it is divisible by only 1 and ifself. For example, 2, 3, 5 and 7 are prime, but 4, 6, 8 and 9 are not. (a) Write a function that determines if a number is prime. (b) Use this function in a program that determines and prints all the prime number between 1 and 10,000. How many of these 10,000 numbers do you really have to test before being sure that you have found all the primes? 還有一個(c)啦,但是只要寫a,b就好。 我說b-2不會是見仁見智吧?? 有請傅神或口卡資碼神解答!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.242.75
chinting :謝謝大神!! 04/20 00:42
goaremdy :PO認真文就沒人推?!?!?!?! 04/20 00:48
Hachi329 :對阿:D 04/20 00:51
andyhihaho :純噓原PO 04/20 01:00
Hachi329 :樓上是不是被我耍了怨念很深阿 XDDD 04/20 01:06
shcyril : 04/20 01:09
dannyace :cyril必推 04/20 01:19
andyhihaho : 04/20 13:02
dannyace :andyhihaho必噓 04/20 13:05
bcjohn :cyril必推 04/20 13:07
andyhihaho := = 04/20 13:07
Hachi329 :總覺得推文也可以慢半拍還滿屌的 04/20 13:10
dannyace :bcjohn必推 04/20 13:21
shcyril : 04/20 18:22
dannyace :cyril必推 04/20 18:29
i19hasen :可以PRINT出來就好了嗎? 04/20 19:43
DKer :是可以,不過會看code,最後有機會A+的一定是效率高的 04/20 21:29
Hachi329 :連助教都只給你箭頭 XDDDDD 04/20 22:19
DKer :CD中 不要介意XD 04/20 22:50
goaremdy :好感動T_T 04/20 23:54
Hachi329 :助教也太溫馨了 溫馨代表 XD 04/20 23:59