Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Bai 3
SUBMITTED BY:
Guest
DATE:
May 10, 2015, 4:08 p.m.
FORMAT:
Text only
SIZE:
362 Bytes
Raw
Download
Tweet
HITS:
688
Go to comments
Report
VAR s:REAL;
n,i:INTEGER;
FUNCTION Giaithua(n:INTEGER):LONGINT;
VAR s,i:LONGINT;
BEGIN
s:=1;
FOR i:=n DOWNTO 1 DO
s:=s*i;
Giaithua:=s;
END;
BEGIN
Write('Nhap n : ');
Readln(n);
s:=0;
FOR i:=0 TO n DO
s:=s+1/giaithua(i);
Write('S= ',s:4:4);
Readln;
END.
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus