program Harjutus_nr2_ehk_teine_ylesanne; uses crt; var x,y,e,a:real; i:integer; begin clrscr; writeln('** Proge koostatud 30.11.1998, autor Rauno Tuul,LDS-11.**'); writeln('** Teine ylesanne: arvuta rea summa. **'); writeln ('Sisesta algvaartus x'); write ('x='); readln (x); writeln ('Sisesta t@psus e'); write ('e='); readln (e); y:=0; a:=1; i:=0; repeat i:=i+1; y:=y+a; a:=a*(x/i); until abs (a)<e; writeln ('******************************************************'); writeln ('** T@psus e=',e:30:1,'**':12); writeln ('** Muutuja x=',x:29:1,'**':12); writeln ('** Arvutamiseks kasutatud kordade arv=',i:3,'**':13); writeln ('******************************************************'); writeln; writeln ('All done, bye bye!'); writeln ('Press Enter'); readln; end.