满意答案
#include
using namespace std;
class CJich
{
public:
CJich(int t):n(t)
{}
void show();
private:
int n;
};
void CJich::show()
{
int s[100]={1},i,j,over=0;
for(i=1;i<100;i++)
s[i]=0;
for(i=1;i<=n;i++)
{
j=0;
while(j<100)
{
s[j]=s[j]*i+over;
over=0;
if(s[j]>=100000)
{
over=s[j]/100000;
s[j]=s[j]%100000;
}
j++;
}
}
j=99;
while(s[j]==0)
j--;
cout<
cout.fill('0');
for(i=j-1;i>=0;i--)
{
cout.width(5);
cout<
}
cout<
}
int
main()
{
CJich J(50);
J.show();
return 0;
}
00分享举报