#include using namespace std; int main() { int i, ok, abc, de, x, y, z, count = 0; char s[11], buf[50]; scanf("%s", s); for(abc = 111; abc <= 999; abc++) for(de = 11; de <= 99; de++) { x = abc*(de%10); y = abc*(de/10); z = abc*de; sprintf(buf, "%d%d%d%d%d", abc, de, x, y, z);//将产生的所有数字存入缓冲区。 ok = 1; for(i = 0; i\n", ++count); printf("%5d\nX%4d\n-----\n%5d\n%4d\n-----\n%5d\n\n", abc, de, x, y, z); } } printf("The number of solutions = %d\n", count); return 0; }