Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8.     int n;
  9.     long x;
  10.     cin>>x;
  11.     cin>>n;
  12.     for(n>0;n<9999;n++){
  13.     while(n!=0){
  14.             x=n%10;
  15.     }
  16.         while(x % 5 ==0){
  17.            x=x/10;
  18.            x=x+1;
  19.         }
  20.  
  21.             cout<<n<<" " <<x<<" " <<endl;
  22.     }
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement