Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- #include <fstream>
- #include <cmath>
- using namespace std;
- void rec(int number) {
- if(number == 0) {
- return;
- }
- cout << number % 10 << " ";
- rec(number / 10);
- }
- int main() {
- int n;
- cin >> n;
- rec(n);
- return 0;
- }
- // rec(4512)
- // rec(451)
- // rec(45)
- // rec(4)
- // rec(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement