Sabtu, 04 Februari 2012

Membuat Program Phytagoras pada Pemrograman Visual Foxpro













Cmd Sisi Miring:
a=VAL(thisform.txta.Value)
b=VAL(thisform.txtb.Value)
c=VAL(thisform.txtc.Value)
hasil= (b^2)+(c^2)
hasil= SQRT(hasil)
thisform.txthasil.Value=hasil



Cmd Sisi Tegak
a=VAL(thisform.txta.Value)
b=VAL(thisform.txtb.Value)
c=VAL(thisform.txtc.Value)
hasil= (a^2)-(c^2)
hasil= SQRT(hasil)
thisform.txthasil.Value=hasil
Cmd sisi Alas
a=VAL(thisform.txta.Value)
b=VAL(thisform.txtb.Value)
c=VAL(thisform.txtc.Value)
hasil= (a^2)-(b^2)
hasil= SQRT(hasil)
thisform.txthasil.Value=hasil

Cmd Bersih
thisform.txta.Value=""
thisform.txtb.Value=""
thisform.txtc.Value=""
thisform.txthasil.Value=""
thisform.txta.SetFocus()

Cmd Keluar
thisform.Release
Selamat MEncoba guys...!!!
Gampang kok...

0 komentar:

Posting Komentar