PROGRAM MENGHITUNG NILAI KELULUSAN MAHASISWA  dengan Delphi 7
-Jalankan Aplikasi Delphi 7
-Buat form awal dengan tampilan dibawah ini 
A.FORM AWAL
  Setelah itu isi coding Projek diatas dengan scipt dibawah ini
B.Coding PROJEK
unit TUGAS1;
interface
uses
  Windows,
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,
StdCtrls;
type
  TForm1 =
class(TForm)
    Label1:
TLabel;
    Label2:
TLabel;
    Label3:
TLabel;
    Label4:
TLabel;
    Label5:
TLabel;
    Label6:
TLabel;
    Label7:
TLabel;
    Label8:
TLabel;
    Button1:
TButton;
    Label9:
TLabel;
    Edit1:
TEdit;
    Edit2:
TEdit;
    Edit3:
TEdit;
    Edit4:
TEdit;
    Edit5:
TEdit;
    Edit6:
TEdit;
    Edit7:
TEdit;
    Edit8:
TEdit;
    Label10:
TLabel;
    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
 
nk,nq,nt,nm,ns,na,hasil:real;
 
rangehuruf:string;
begin
    nk
:=strtofloat(edit3.Text);
    nq
:=strtofloat(edit4.Text);
    nt
:=strtofloat(edit5.Text);
    nm
:=strtofloat(edit6.Text);
    ns
:=strtofloat(edit7.Text);
hasil
:=(nk*0.1)+(nq*0.15)+(nt*0.15)+(nm*0.25)+(ns*0.35);
edit8.Text:=floattostr(hasil);
label10.caption:=(rangehuruf);
if hasil >=85 then
begin
rangehuruf:='A'
end
else if hasil >=70 then
begin
rangehuruf:='B'
end
else if hasil>=55 then
begin
rangehuruf:='C'
end
else if hasil >=40 then
begin
rangehuruf:='D'
end
else if hasil >=0 then
begin
rangehuruf :='E'
end;
label10.caption:=(rangehuruf);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;
end.
Tampilan Hasil Program tersebut Jika Di Jalankan
C.APLIKASI
D.PENERAPAN APLIKASI
2. Contoh Program Mencari Akar Persamaan Kuadrat Menggunakan Delphi 7
 Pertama Harus Diketahui Terlebih dahulu rumus Mencari Akar Persamaan Kuadrat :
Rumus : Ax^2+Bx+C=0
 Lalu Ikuti tutorial Berikut ini 
PROGRAM MENCARI AKAR PERSAMAAN KUADRAT
Ax^2+Bx+C=0
Ax^2+Bx+C=0
    Desain terlebih dahulu Form Projek Delphi 7 seperti dibawah ini
A.FORM
AWAL
B.Coding PROJEK
unit UnitINTERNET;
interface
uses
  Windows, Messages, SysUtils, Variants,
Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Button1: TButton;
    Label6: TLabel;
    Label7: TLabel;
    Edit4: TEdit;
    Edit5: TEdit;
    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 
a,b,c,d,x1,x2:real;
  begin
    a:=strtofloat(edit1.text);
    b:=strtofloat(edit2.text);
    c:=strtofloat(edit3.text);
  (*.......rumus persamaan kuadrat..........*)
    d:=(b*b)-(4*a*c);
    if d=0 then
    begin
     x1:=-b/(2*a);
     x2:=-b/(2*a);
     edit4.text:=floattostr(x1);
     edit5.text:=floattostr(x2);
    end;
      if d<0 then
       begin
       edit4.text:='imajiner';
       edit5.text:='imajiner';
      end;
      if d>0 then
        begin
        x1:=(-b+sqrt(d))/(2*a) ;
  // fungsi ('Sqrt') UNTUK MENCARI AKAR...
        x2:=(-b-sqrt(d))/(2*a);
  // fungsi ('Sqr')  UNTUK MENCARI PANGKAT DUA...
        edit4.text:=floattostr (x1);
        edit5.text:=floattostr(x2);
      end;
end;
procedure TForm1.Button2Click(Sender:
TObject);
begin
close;
end;
end.
Cth:  D>0
Cth:
D<0
Cth:
D=0
 









Monggo Ditulis komentarnya di mari agan