#include "stdafx.h"#include "iostream"using namespace std;void f(int n);int _tmain(int argc, _TCHAR* argv[]){ int a; cout<<"123123"<<endl; cin>>a; if(a==0) cout<<0<<endl; else { f(a); } cout<<endl; return 0;}void f(int n){ if(n==0) { return; } else { f(n/2); //这个是怎么实现的呢?请讲的具体些。最好举个例子 cout<<n%2; }}
添加回答
举报
0/150
提交
取消