看板 TransCSI 關於我們 聯絡資訊
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