Zestaw 6.
Zadanie 1.
procedure TForm1.Button1Click(Sender: TObject);
var i,n:integer;
suma:real;
begin
n:=StrToIntDef(Edit1.Text,1);
Edit1.Text:=IntToStr(n);
for i := 1 to n do suma:=suma+Power(-1,i+1)/Power(2*i-1,3);
Label3.Caption:=FloatToStrF(suma,ffNumber,4,2);
end;
end.
Zadanie 2.
procedure TForm1.FormShow(Sender: TObject);
var n: integer;
Sn,Sn2: double;
f:textFile;
begin
n:=3;
AssignFile(f,'C:\Dane\tabela.txt');
Rewrite(f);
repeat
Sn := Power(-1,n+1)/Power(2*n-1,3) ;
Sn2 := Abs(n +PI*ln(Abs(n+1)));
Writeln(f,IntToStr(n) + ' ' + FloatToStr(Sn)+ ' ' + FloatToStr(Sn2));
n := n+3;
until n > 300;
CloseFile(f);
end;
Zadanie 3.
Nie umiem ;/
Zadanie 4.
Zadanie 5.
Zadanie 6.
procedure TForm1.FormResize(Sender: TObject);
begin
Canvas.Brush.Color := clWhite;
Canvas.Brush.Style := bsSolid;
Canvas.Pen.Color := clRed; //kolor
//Canvas.Brush.Style:=bsCross;
Canvas.Brush.Color := clyellow;
Canvas.Ellipse(100,100,10,10);