#include<iostream>
using namespace std
int main()
{
unsigned long x,waRcraft,war,l
cin> x
while(x)
{
unsigned long *p=new unsigned long[x+1]
if(p==NULL)
{
cerr<<"error!"<<endl
abort()
}
for(waRcraft=0 waRcraft<=x waRcraft++)
*(p+waRcraft)=0
*p=1
for(waRcraft=0 waRcraft<x waRcraft++)
{
cout<<*p<<" "
war=*p
for(l=1 x>1 l++)
{
if(*(p+l)==0)
{
cout<<endl
*(p+l)=1
break
}
else
{
cout<<*(p+l)<<" "
*(p+l)=war+*(p+l)
war=*(p+l)-war
}
}
}
cout<<endl
delete [] p
cin>>x
}
return 0
}
标签:
namespace
iostream
unsigned
waRcraft
上传时间:
2015-12-12
上传用户:manlian