Advertisement
STANAANDREY

sb prog 29

Mar 4th, 2022
1,116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void afis(int n) {
  5.     if (n) {
  6.         afis(n / 10);
  7.         cout << n % 10 << endl;
  8.     }
  9. }
  10.  
  11. int main() {
  12.     int n;
  13.     cin >> n;
  14.     afis(n);
  15.     return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement