résoudre ax+b=0 en VB
3 participants
Page 1 sur 1
résoudre ax+b=0 en VB
voilà un programme pour résoudre une équation du 1er degré
Dim a, b, c As Double
Private Sub Command2_Click()
a = 0
b = 0
c = 0
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub cmditialis_Click()
txtvara.Text = ""
txtvarb.Text = ""
txtvarc.Text = ""
End Sub
Private Sub cmdquit_Click()
End
End Sub
Private Sub cmdresou_Click()
a = CDbl(txtvara.Text)
b = CDbl(txtvarb.Text)
If a = 0 Then
MsgBox "impossible de résoudre"
Else: c = -b / a
txtvarc.Text = c
End If
End Sub
Dim a, b, c As Double
Private Sub Command2_Click()
a = 0
b = 0
c = 0
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub cmditialis_Click()
txtvara.Text = ""
txtvarb.Text = ""
txtvarc.Text = ""
End Sub
Private Sub cmdquit_Click()
End
End Sub
Private Sub cmdresou_Click()
a = CDbl(txtvara.Text)
b = CDbl(txtvarb.Text)
If a = 0 Then
MsgBox "impossible de résoudre"
Else: c = -b / a
txtvarc.Text = c
End If
End Sub
boudal yassine- Messages : 11
Date d'inscription : 11/04/2009
Age : 34
Localisation : casablanca
Re: résoudre ax+b=0 en VB
merci pqp yassine
Hassan EL GASSIMI- Messages : 11
Date d'inscription : 14/04/2009
Age : 34
Localisation : Mohammedia
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|