Advertisement
awsmpshk

Untitled

Apr 1st, 2020
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void res(int n) {
  6.     if (n > 0) {
  7.         res(n / 10);
  8.         cout << n % 10;
  9.     }
  10.     return;
  11. }
  12.  
  13. int main() {
  14.     int a, b;
  15.     cin >> a >> b;
  16.     for (int i = a; i <= b; ++i) {
  17.         res(i);
  18.         cout << " ";
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement