PROJECT KONVERSI NILAI, BULAN DAN SUHU (DELPHI 7)
Posted in DELPHI 7
.............KONVERSI NILAI, BULAN, SUHU.................
procedure TForm1.Button1Click(Sender: TObject);
var x:real ;
begin
x:=strtofloat(edit1.Text);
if x>100 then showmessage('anda salah')else
if x>=85 then edit2.Text:='A' else
if x>=70 then edit2.Text:='B' else
if x>=55 then edit2.Text:='C' else
if x>=40 then edit2.Text:='D' else
edit2.Text:= 'gagal'
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.Clear; edit2.clear;
end;
end.
..........KONVERSI BULAN............
procedure TForm1.Button1Click(Sender: TObject);
var x: integer;
begin
x:=strtoint(edit1.Text);
case x of
1: edit2.Text:='Januari';
2: edit2.Text:='Februari';
3: edit2.Text:='Maret';
4: edit2.Text:='April';
5: edit2.Text:='Mei';
6: edit2.Text:='Juni';
7: edit2.Text:='Juli';
8: edit2.Text:='Agustus';
9: edit2.Text:='September';
10: edit2.Text:='Oktober';
11: edit2.Text:='November';
12: edit2.Text:='Desember';
end;
end;
end.
..........KONVERSI SUHU........
procedure TForm1.Button1Click(Sender: TObject);
var x:real;
begin
x:=strtofloat(edit1.text);
if x>=100 then edit2.Text:='UAP'else
if x>=0 then edit2.Text:='CAIR'else
if x<0 then edit2.Text:='PADAT';
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
EDIT2.Text:='';
EDIT1.Text:='';
end;
end.
procedure TForm1.Button1Click(Sender: TObject);
var x:real ;
begin
x:=strtofloat(edit1.Text);
if x>100 then showmessage('anda salah')else
if x>=85 then edit2.Text:='A' else
if x>=70 then edit2.Text:='B' else
if x>=55 then edit2.Text:='C' else
if x>=40 then edit2.Text:='D' else
edit2.Text:= 'gagal'
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.Clear; edit2.clear;
end;
end.
..........KONVERSI BULAN............
procedure TForm1.Button1Click(Sender: TObject);
var x: integer;
begin
x:=strtoint(edit1.Text);
case x of
1: edit2.Text:='Januari';
2: edit2.Text:='Februari';
3: edit2.Text:='Maret';
4: edit2.Text:='April';
5: edit2.Text:='Mei';
6: edit2.Text:='Juni';
7: edit2.Text:='Juli';
8: edit2.Text:='Agustus';
9: edit2.Text:='September';
10: edit2.Text:='Oktober';
11: edit2.Text:='November';
12: edit2.Text:='Desember';
end;
end;
end.
..........KONVERSI SUHU........
procedure TForm1.Button1Click(Sender: TObject);
var x:real;
begin
x:=strtofloat(edit1.text);
if x>=100 then edit2.Text:='UAP'else
if x>=0 then edit2.Text:='CAIR'else
if x<0 then edit2.Text:='PADAT';
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
EDIT2.Text:='';
EDIT1.Text:='';
end;
end.
0 comments: