Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- void f(int n){
- if (n < 10){
- cout << n << endl;
- return;
- }
- f (n / 10);
- cout << n % 10 << endl;
- }
- signed main(){
- int n;
- cin >> n;
- f(n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement