49
EHM bu dаstur uchun quyidаgi nаtijаni berаdi:
S
500500
Topshiriqlar.
1. s o‘zgaruvchining yakuniy qiymatini hisoblang:
a)
s:=0; i:=0;
while i<5 do i:=i+1; s:=s+1/i;
b)
s:=0; i:=0;
while i<5 do begin i:=i+1; s:=s+1/i; end;
c)
s:=0; i:=1;
repeat s:=s+1/i; i:=i-1 until i<=1 ;
d)
s:=0;
for i:=1 to 5 do s:=s+1/i;
2. s o‘zgaruvchining yakuniy qiymatini hisoblang:
e)
s:=0; i:=5;
while i<5 do i:=i+1; s:=s+1/i;
f)
s:=0; i:=0;
while i<5 do begin i:=i+1; s:=s+1/i; end;
g)
s:=0; i:=1;
repeat s:=s+1/i; i:=i-1 until i<=1 ;
h)
s:=0; k:=6
for i:=k to 5 do s:=s+1/i;
5>5>5>5>