为什么输出是0啊
程序代码:
#include <iostream.h> #include "h.h" void main() { long int a,b=0,c=1,e=0; cin>>a; for (;a>=2;a=a/2) { b=a%2*fun(c,10); e+=b; c++; } cout<<e<<endl; } #include <iostream.h> int fun(int a,int b) { if (a==1)return b; else return b*fun(a-1,b); }谢谢了