作者austinting (神經細胞)
看板KS96-310
標題[問題] 程設兩題
時間Mon May 18 00:52:36 2009
The gcd of x and y is defined recursively as follows: IF y is equal to 0,
then gcd( x, y ) is x; otherwise gcd( x, y ) is gcd( y, x%y ) where % is the
remainder operator. Write a recursive function gcd that returns the greatest
common divisor of x and y.
Write a program that runs 1000 games of craps ( without human intervention )
我用的是dev-C
現在讀到Pointer這章,Arrays的部分勉強看得懂
程式儘量不要太深奧好嗎
感恩^^
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 134.208.32.218
推 flarecutter:毛哥我看不懂英文啊 05/18 11:27
→ austinting:GCD應該是最大公因數 craps我也不知道是甚麼,我還在 05/18 16:38
→ austinting:想是不是程設的專業術語,電子辭典解釋是"罵人的話", 05/18 16:41
→ austinting:不過應該不是叫我們寫一個跑出一千種罵人的遊戲吧XD 05/18 16:43
→ austinting:應該是這個 05/18 16:45
推 trashprince:一開始就講明用遞迴寫了 05/19 00:06