用汇编语言实现s=1!+2!+3!+4!+5!+6!+7!+8!

如题所述

可以用MATLAB实现如下:
s=0;
for n=1:8
s=factorial(n)+s;
end
disp(s);
结果:46233
温馨提示:答案为网友推荐,仅供参考
相似回答