嗯,我跟楼上写的一样
void p (int n)
{
if (n == 1)
{
cout<<n<<endl;
}
else
{
p (n-1);
for (int i = 0;i < n;i++)
{
cout<<n;
}
cout<<endl;
}
[此贴子已经被作者于2005-11-19 21:17:03编辑过]

爱编程,爱生活