#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