IRC-Galleria

sspoon

sspoon

iha normaalei tyyppei

Blogi

- Vanhemmat »

heiPerjantai 26.12.2008 01:52

[Ei aihetta]Keskiviikko 29.10.2008 11:18

unit Keskiarco;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;

type
TForm1 = class(TForm)
uusiluku: TEdit;
vastaus: TEdit;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
a:integer;
summa:real;
implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var luku:real;
begin
luku:=strtofloat(uusiluku.text);
uusiluku.text:=' ';
a:=a+1;
summa:=summa+luku;
vastaus.text:='keskiarco on:'+floattostr(summa/a);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
a:=0;
summa:=0;
end;

end.















a:=strtofloat(luku1.text);

b:=strtofloat(luku2.text);
vastaus.text:=floattostr(a)+'*'+floattostr(b)+'='+floattostr(a*b);


a:=strtofloat(luku1.text);
b:=strtofloat(luku2.text);
vastaus.text:=floattostr(a)+':'+floattostr(b)+'='+floattostr((a/b));


unit laskuri;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
a:integer;
implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
a:=a+10;
canvas.rectangle(300+a,200,400+a,300);

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
a:=0;
end;

end.

<3Sunnuntai 28.09.2008 03:43

lanit med appim <3 cs , irc-galleria & msn ; >

moiTorstai 10.07.2008 01:59

laelMaanantai 24.03.2008 16:57

lael

naaamaaat vittujooLauantai 22.03.2008 18:35

Tänää naamat !

asdasdSunnuntai 16.12.2007 17:02

asdasd
- Vanhemmat »