[問題] 程式

看板TransCSI作者 (00)時間20年前 (2005/05/16 15:27), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/9 (看更多)
int proc2(int *a){ int b; b=*a+1; printf("b=%d\n",b); while(b<=3){ b+=proc2(&b); printf("b=%d\n",b); } printf("result b =%d\n",b); return (b); } void main(void){ int n1; printf("an easy test!!\n"); n1=1; while(n1<=30) { n1+=proc2(&n1); printf("n1=%d\n",n1); } } ans: an easy test!! b = 2 b = 3 b = 4 the return value of b =4 b = 7----->這裡開始搞不定>,< -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.135.73.232
文章代碼(AID): #12Y4joF_ (TransCSI)
討論串 (同標題文章)
文章代碼(AID): #12Y4joF_ (TransCSI)