kusy
Dołączył: 13 Lis 2010
Posty: 5
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Wohyń
|
Wysłany: Pią, 18 Mar 2011 23:36:52 +0000 Temat postu: zadania |
|
|
to jest te gupie zadanie co liczy pole kwadratu bez kółek
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, r1, r2, r3, r4, p1, p2, p3, p4 As Single
r1 = CSng(txt2.Text)
r2 = CSng(txt3.Text)
r3 = CSng(txt4.Text)
r4 = CSng(txt5.Text)
Call pole(r1, p1)
Call pole(r2, p2)
Call pole(r3, p3)
Call pole(r4, p4)
a = CSng(txt1.Text)
lbl1.Text = (a * a - p1 - p2 - p3 - p4).ToString
End Sub
Private Sub pole(ByVal r As Single, ByRef polx As Single)
polx = r * r * Math.PI
End Sub
End Class
Post został pochwalony 0 razy
|
|