Advertisement
efc99115

Untitled

Apr 30th, 2021
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.         int counter=0;
  6.         for(int i=100;i<1000;i+=100)
  7.         {
  8.                 for(int j=0;j<100;j+=10)
  9.                 {
  10.                         for(int k=1;k<10;++k)
  11.                         {
  12.                                 if(((i/100+j+k*100)-(i+j+k))==99)
  13.                                 {
  14.                                         cout<<i+j+k<<' '<<++counter<<endl;
  15.                                 }
  16.                         }
  17.                 }
  18.         }
  19.         return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement