
Stian Søiland, IT 111, øvingsgruppe 15 (stud.ass. Kari Alvheim)

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
snettopris: TEdit;
sbruttopris: TEdit;
smva: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var nettopris,mva : real;
begin
nettopris := StrToFloat(snettopris.text);
mva := nettopris*23/100;
smva.text := FormatFloat('#,##0.00',mva);
sbruttopris.text := Formatfloat('#,##0.00',(nettopris+mva));
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
snettopris.clear;
smva.clear;
sbruttopris.clear;
end;
end.