Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int counter=0;
- for(int i=100;i<1000;i+=100)
- {
- for(int j=0;j<100;j+=10)
- {
- for(int k=1;k<10;++k)
- {
- if(((i/100+j+k*100)-(i+j+k))==99)
- {
- cout<<i+j+k<<' '<<++counter<<endl;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement