#include<iostream> using namespace std; int main() { for(int x=0;x<10;x++) { for(int y=0;y<10;y++) { for(int z=0;z<10;z++) { if((110*x+100*y+12*z)==532) { cout<<"x="<<x<<" "; cout<<"y="<<y<<" "; cout<<"z="<<z<<" "; cout<<endl; } } } } return 0; }
#include<iostream> using namespace std; int main() { for(int x=0;x<10;x++) { for(int y=0;y<10;y++) { for(int z=0;z<10;z++) { if((110*x+100*y+12*z)==532) { cout<<"x="<<x<<" "; cout<<"y="<<y<<" "; cout<<"z="<<z<<" "; cout<<endl; } } } } return 0; }