Wednesday, 24 June 2015

Kalkulator Sederhana ( VB)



komponen nya

- 3 label
- 3 textbox
- 5 button


edit properties

-Label 1
text : Nilai 1

-Label 2
text : Nilai 2

-Label 3
text : Hasil

-Textbox 1
name : nilai1

-Textbox 2
name : nilai2

-Textbox 3
name : hasil

-button1
text : +

-button2
text : -

-button3
text : /

-button4
text : *

untuk koding nya

-button1 (+)
hasil.Text = Val(nilai1.Text) + Val(nilai2.Text)

-button2 (-)
hasil.Text = (nilai1.Text) - (nilai2.Text)

-button3 (*)
hasil.Text = (nilai1.Text) * (nilai2.Text)

-button4 (/)
hasil.Text = (nilai1.Text) / (nilai2.Text)





No comments :

Post a Comment