Jump to content
Forum Windows-az.com

Ədədin kökünü tapmaq


On_LiNe
 Share

Recommended Posts

7e94458933d8.png


Form açın və Forma 1 Button 1 textboxt əlavə edin.


Buttona klik edib bu kodlari yazin:

Dim eded As Integer
Dim kok As Double
eded = TextBox1.Text
If eded = 0 Then
MsgBox("Ədəd Sıfırdır")
ElseIf eded < 0 Then
MsgBox("Ədəd mənfidir")
Else
kok = Math.Sqrt(eded)
MsgBox(kok)
End If



Ümumi kod:


Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim eded As Integer
Dim kok As Double
eded = TextBox1.Text
If eded = 0 Then
MsgBox("Ədəd Sıfırdır")
ElseIf eded < 0 Then
MsgBox("Ədəd mənfidir")
Else
kok = Math.Sqrt(eded)
MsgBox(kok)
End If

End Sub
End Class
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • loading...
×
×
  • Create New...