#include<stdio.h>
int main()
{
int A, B, C, D;
for(A=0; A<10; A++)
  {
  for(B=0; B<10; B++)
   {
   for(C=0; C<10; C++)
    {
    for(D=0; D<10; D++)
     {
     if(A*1000+B*100+C*10+D-(C*100+D*10+C)==A*100+B*10+C)
      {
      printf("A=%-2dB=%-2dC=%-2dD=%-2d\n", A, B, C, D);
      }
     }
    }
   }
  }
getch();
return 0;
}
[此贴子已经被作者于2006-2-17 18:44:23编辑过]