[問題] 一題程式

看板TransCSI作者時間19年前 (2005/07/03 14:15), 編輯推噓3(300)
留言3則, 3人參與, 最新討論串1/3 (看更多)
#include<stdio.h> void somefunction(const int b[],int c); int main(){ int a[]={1,3,5,7,9,11}; somefunction(a,5); return 0; } void somefunction(const int b[],int c){ if(c>0){ somefunction(&b[1],c-1); printf("%d\n",b[0]); } } 請問一下答案 這是我做出來的不過我不確定 9 7 5 3 1 請問這樣對嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.166.129.192

220.135.213.145 07/03, , 1F
我跑出來跟你寫的一樣,應該對了吧^^"
220.135.213.145 07/03, 1F

218.35.186.6 07/03, , 2F
這是考古題嗎?我覺得這題還滿有趣的~
218.35.186.6 07/03, 2F

218.166.130.178 07/03, , 3F
這是台聯大93年計概題目
218.166.130.178 07/03, 3F
文章代碼(AID): #12nuA6g9 (TransCSI)
文章代碼(AID): #12nuA6g9 (TransCSI)