討論串[問題] 用一階陣列寫巴斯卡三角形
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
開發平台(Platform): (Ex: VC++, GCC, Linux, ...). VC++ 2010. 問題(Question):. 我想用一階陣列寫出巴斯卡三角形. 用一個b[]和c[]的一維陣列. c[j]=b[j-1]+b[j];. 這樣讓他跑下去. 不過不知道為什麼一行c[j]=b[
(還有672個字)
內容預覽:
int a,i,j;. cout<<"請輸入要幾層的巴斯卡三角型:";. cin>>a;. cout<<"\n";. int *b,*c;. b=new int[a];. c=new int[a];. *b=1;. *c=1;. *(c+1)=1;. for(i=0;i<=a;i++) //有看到這
(還有370個字)
首頁
上一頁
1
下一頁
尾頁