我也计了第一题,帮我看一看对不对吧
var
i,j,k,m:integer;
for i:=1 to 98 do
for j:=1 to 48 do
for k:=1 to 18 do
if (i*1+j*2+k*5=100)then begin
writeln(i:3,j:3,k:3);
m:=m+1;
end;
writeln(m:3);
readln;
end.
第二题
var
e:real;
sum,n,i:integer;
begin
sum:=1;
readln(n);
for i:=1 to n do
begin
sum:=sum*i;
e:=e+1/sum;
end;
writeln(e:2:9);
readln;
end.