#include<cstdio> #include<cstdlib> using namespace std; int main(){ int a,b,c;//定义名字是a,b,c的三个整形变量 for(a = 0; a <= 9; ++a){ for(b = 0; b <= 9; ++b){ for(c = 0; c <= 9; ++c){ //abc+bcc=532 //abc --> 100*a+10*b+c if(100*a+10*b+c + 100*b+10*c+c == 532){ printf("%d %d %d\n",a,b,c); } } } } system("pause"); }