[VB] Kare Küp Karekök alan Program

onekedisi

New member
Kod:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim s, k
        's ve k isimli 2 değişken oluştur'
        s = TextBox1.Text
        'TextBox1'deki değeri s'ye ata'
        If RadioButton1.Checked = True Then k = s * s
        'RadioButton1 işaretliyse k'ya s'nin karesini ata'
        If RadioButton2.Checked = True Then k = s * s * s
        'RadioButton2 işaretliyse k'ya s'nin küpünü ata'
        If RadioButton3.Checked = True Then k = Math.Sqrt(s)
        'RadioButton3 işaretliyse k'ya s'nin karekökünü ata'
        Label1.Text = "Sonuç : " + String.Concat(k)
        'Sonucu Label1'e yaz'

    End Sub

End Class
İlk VB Programı için fena değil ha? :goz:

Proje Klasörü:
http://rapidshare.com/files/175362995/Kare_Kup_ve_KareKok_Almak.rar
 

HTML

Üst