Membuat Kalkulator Sederhana

KalkuLator ini merupakan kalkulator penghitung dengan operasi 2 bilangan…

Cara buatnya:

1. Langkah pertama buka program delphi

2. Klik File -> New -> Apllication

3. Lalu buat formnya

4. Isikan code dibawah ini dengan cara klik double pada operasi di radio button

Jumlah:
var a,g,i : real;
begin
a := StrToFloat (Edit1.Text);
g := StrToFloat (Edit2.Text) ;
i := a + g ;
Edit3.Text := FloatToStr (i);
end;

Kurang:
var a,g,i : real;
begin
a := StrToFloat (Edit1.Text);
g := StrToFloat (Edit2.Text) ;
i := a – g ;
Edit3.Text := FloatToStr (i);
end;

Kali
var a,g,i : real;
begin
a := StrToFloat (Edit1.Text);
g := StrToFloat (Edit2.Text) ;
i := a * g ;
Edit3.Text := FloatToStr (i);
end;

Bagi
var a,g,i : real;
begin
a := StrToFloat (Edit1.Text);
g := StrToFloat (Edit2.Text) ;
i := a / g ;
Edit3.Text := FloatToStr (i);
end;

Reset:
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
end;

Close :
begin
close;
end;

5. kLo udh selesai jgn lupa Save all
6. LaLu Compile dengan cara tekan F9
Masih error?
Sedot aj sourcecodenya dari sini

Kalkulator Sederhana

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: