# include
# include
# include
# include
using namespace std;
Int x=0;
Void the print (char Numbers [])
{int I=0;
for( i=0; I
}
For (int j=I; J
Cout<" \ t ";
}
Void the set (char Numbers [], int n, int I)
{if (I==n) {print (Numbers);
return; }
While (Numbers [I] <='9')
{//coutSet (Numbers, n, I + 1);
+ + Numbers [I];
x++;
}
}
Void printdigits (int n)
{if (n<=0) return;
Char * Numbers=new char [n + 1);
Numbers [n]='\ 0';
Memset (Numbers, '0', n);
Set (Numbers, n, 0);
The delete [] Numbers;
}
Void main ()
{
Printdigits (2);
Cout<" X="& lt;
}
X is a global variable, used to detect the while loop
CodePudding user response:
After tracking debugging is the basic skills, learn to find problem quickly,