| ||||||||||
| 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.h>
int main()
{
int n,i,j,temp;
cin>>n;
int line[100]={0};
line[0]=1;line[1]=1;
for(i=1;i<=n;i++)
{
temp=0;
for(j=1;j<=i;j++)
{
line[j]+=temp;
temp=line[j]-temp;
cout<<line[j]<<" ";
}
cout<<endl;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator