求当1!+3!+5!+.的值不超过1020时的临界值及n的值.程序设计题

来源:学生学帮网 编辑:学帮网 时间:2024/06/04 08:20:42

求当1!+3!+5!+.的值不超过1020时的临界值及n的值.程序设计题

我用PASCAL,
procedure calculate;
var
n,i,s1,s2:integer;
begin
n:=1;
s2:=0;
while (s2