Kamis, 27 Desember 2012

informasi dan ilmu kompoter


Contoh aplikasi Sederhana Perhitungan nilai mahasiswa menggunakan Delphi 7
http://3.bp.blogspot.com/-jTyylonMUxg/UH_mwRv86SI/AAAAAAAAAI4/cNWjubSlI0o/s320/Tampilan.jpg

  Kalo mau dunlut filenya silahkan
disini
Ini adalah codingnya;

var ab,hr,tg,ut,ua,hasil : real;
begin
 ab:=strtofloat(edit1.Text);
 hr:=strtofloat(edit2.Text);
 tg:=strtofloat(edit3.Text);
 ut:=strtofloat(edit4.Text);
 ua:=strtofloat(edit5.Text);
 if ab>14 then
    begin
    MessageDlg('Maksimal 14 Pertemuan',mtInformation,[mbOK],0);
    edit1.Text:='';
    edit1.SetFocus;
    end
    else
    begin
    hasil:=(ab*0.32)+(hr*0.1)+(tg*0.1)+(ut*0.25)+(ua*0.5);
    edit6.Text:=floattostr(hasil);

        if hasil>80 then
          edit7.Text:='A'
        else if hasil>70 then
          edit7.Text:='B'
        else if hasil>60 then
          edit7.Text:='C'
        else if hasil>50 then
          edit7.Text:='D'
        else edit7.Text:='E';
    end;
end;
Diposkan oleh Tobel Hidayat Rahman di 04:31
Label: Pelajaran
Tidak ada komentar:
Poskan Komentar

Contoh Coding Program Aplikasi Penjualan Barang Sederhana

http://www.anakkedua.com/wp-content/uploads/2012/06/aplikasi-penjualan-barang-300x226.jpg
Dan ini sebuah codingnya :
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Edit3KeyPress(Sender: TObject; var Key: Char);
VAR
KODE : INTEGER;
HRG,BYK,JMLH:SINGLE;
SJMLH : STRING;
ѕtаrt
IF KEY = CHR(13) THEN
BEGIN
VAL(EDIT2.Copy,HRG,KODE);
VAL(EDIT3.Copy,BYK,KODE);
JMLH:=HRG*BYK;
STR(JMLH:10:0,SJMLH);
EDIT4.Copy:=SJMLH;
еnd;
END;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
ѕtаrt
IF KEY=CHR(13) THEN
BEGIN
EDIT2.SetFocus;
END;
еnd;
procedure TForm1.Edit2KeyPress(Sender: TObject; var Key: Char);
ѕtаrt
IF KEY = CHR(13) THEN
BEGIN
EDIT3.SetFocus;
END;
еnd;
еnd.

0 komentar:

Posting Komentar