| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
怎么不过呢?#include <iostream>
using namespace std;
void main(void)
{
const max=60;
int n,k,i,a,b;
int c[max];
cin>>n;
c[1]=1;
for(k=1;k<=n;k++)
{
c[k+1]=1;
b=0;
for(i=1;i<=k;i++)
{
cout<<c[i]<<' ';
a=c[i];
c[i]=b+c[i];
b=a;
}
cout<<endl;
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator