标签:http src inf mamicode space 递归 iostream int 顺序
代码:
#include <iostream> using namespace std; void print_n(int x) { if(x<10) { cout<<x<<endl; } else { print_n(x/10); cout<<x%10<<endl; } } main() { int a; cin>>a; print_n(a); }
运行结果:
标签:http src inf mamicode space 递归 iostream int 顺序
原文地址:https://www.cnblogs.com/wanjinliu/p/11391688.html