cs_raphy2
Messages postés33Date d'inscriptionmercredi 5 février 2003StatutMembreDernière intervention25 juillet 2003
-
12 avril 2003 à 13:40
cs_rene38
Messages postés1858Date d'inscriptionsamedi 29 juin 2002StatutMembreDernière intervention17 octobre 2013
-
21 avril 2003 à 00:06
voila jai mon programme y m arrondie tout a la troncature par exemple 31/2 = 15 et comme j'ai rien compris au variables je pensse que c ca .
voila mon code
rapport As Double
rapport2 As Double
rapport3 As Double
Public Function thales()
rapport = Val(txtab / txtde)
rapport2 = Val(txtca / txtce)
rapport3 = Val(txtcb / txtcd)
End Function
Private Sub cmdverif_Click()
If raport > rapport2 Then
possibleoupas.Caption = "Votre triangle ne peut être utiliser avec le théorème de Thalès"
End If
If rapport < rapport2 Then
possibleoupas.Caption = "Votre triangle ne peut être utiliser avec le théorème de Thalès"
End If
If rapport = rapport2 Then
possibleoupas.Caption = "Votre triangle peut être utiliser avec le théorème de Thalès"
End If
End Sub
cs_raphy2
Messages postés33Date d'inscriptionmercredi 5 février 2003StatutMembreDernière intervention25 juillet 2003 12 avril 2003 à 18:27
Non toujour pas
peut etre que je m'y prend mal, en fait je ve calculer des raport de chifre (6/2) par exemple et voir si apres y sont diferents.
Exemple
raport1= (6/2)
raport2=(6/5)
raport3=(6/2)
Les raports ne sont pas egaux donc y a une phrase qui s'affiche.
La a chaque fois meme quand je met des truc pas egaux y me dit c bon c egaux.
Je repete mon code:
Dim rapport As Double
Dim rapport2 As Double
Dim rapport3 As Double
Public Function thales()
rapport = (txtdeText / txtabText)
rapport2 = (txtceText / txtcaText)
rapport3 = (txtcd.Text / txtcb.Text)
End Function
Private Sub Command1_Click()
End Sub
Private Sub cmdverif_Click()
If raport > rapport2 Then
possibleoupas.Caption = "Votre triangle ne peut être utiliser avec le théorème de Thalès"
End If
If rapport < rapport2 Then
possibleoupas.Caption = "Votre triangle ne peut être utiliser avec le théorème de Thalès"
End If
If rapport = rapport2 Then
possibleoupas.Caption = "Votre triangle peut être utiliser avec le théorème de Thalès"
End If
End Sub
cs_rene38
Messages postés1858Date d'inscriptionsamedi 29 juin 2002StatutMembreDernière intervention17 octobre 201311 21 avril 2003 à 00:00
Bonjour
Tu devrais mettre Option Explicit dans la section Déclarations de ta Form pour éviter les erreurs :
Option Explicit
Dim rapport As Double, rapport2 As Double, rapport3 As Double
Public Function thales()
rapport = (txtdeText / txtabText)
rapport2 = (txtceText / txtcaText)
rapport3 = (txtcd.Text / txtcb.Text)
End Function
Private Sub Command1_Click()
End Sub
Private Sub cmdverif_Click()
If rapport <> rapport2 Then
possibleoupas.Caption = "Votre triangle ne peut pas être utilisé avec le théorème de Thalès"
Else
possibleoupas.Caption = "Votre triangle peut être utiliser avec le théorème de Thalès"
End If
End Sub
cs_rene38
Messages postés1858Date d'inscriptionsamedi 29 juin 2002StatutMembreDernière intervention17 octobre 201311 21 avril 2003 à 00:06
Bonjour
Tu devrais mettre Option Explicit dans la section Déclarations de ta Form pour éviter les erreurs :
Option Explicit
Dim rapport As Double, rapport2 As Double, rapport3 As Double
'--- Fin de la section Déclarations -----
Private Sub cmdverif_Click()
rapport = (txtde/ txtab)
rapport2 = (txtce / txtca)
rapport3 = (txtcd / txtcb)
If rapport <> rapport2 Then
possibleoupas.Caption = "Votre triangle ne peut pas être utilisé avec le théorème de Thalès"
Else
possibleoupas.Caption = "Votre triangle peut être utilisé avec le théorème de Thalès"
End If
End Sub