Delphi

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

Delphi - Øving 3 - Oppgave 1

Oppgave 1, bilde 1 Oppgave 1, bilde 2


interface

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

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

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);

function Min(a,b: integer): integer;
begin
 if a<b then Min := a
 else Min := b;
end;

begin
 kari_is_sweetest.caption := 'registrering pågår';
 kari_is_sweetest.caption := IntToStr(
  Min(StrToInt(InputBox('Innlesing','Skriv inn ditt tall','')),
   Min(StrToInt(InputBox('Innlesing','Skriv inn ditt tall','')),
    Min(StrToInt(InputBox('Innlesing','Skriv inn ditt tall','')),
     StrToInt(InputBox('Innlesing','Skriv inn ditt tall',''))
    )
   )
  )
 );
end;

end.
  

 


© Stian Søiland 1998

Valid HTML 4.0!