简短的代码不一定就好,不过神vLinux飘飘的算法确实不错!
when i want to ask anyone,i will ask myself first.
用c++一样的
# include <iostream.h>
void main()
{
long x,i,n,j;
for(i=1;i<10;i++)
{
x=0;
cout<<i ;
x=i+x;
for(n=i,j=1;j<=8;j++)
{
n=n*10+i;
x=n+x;
cout<<"+"<<n;
}
cout<<"="<<x<<endl;
}
}