FOR il me met pa ske jvoudrai

Résolu
cs_cricri_forever Messages postés 49 Date d'inscription mercredi 28 septembre 2005 Statut Membre Dernière intervention 31 mars 2006 - 5 oct. 2005 à 00:25
sosodef88 Messages postés 78 Date d'inscription jeudi 17 février 2005 Statut Membre Dernière intervention 26 décembre 2005 - 5 oct. 2005 à 00:49
comment faire pour qu'il me donne la table de deux de 2 a 20 pcq la il me fait 4 8 12 ....



a = 0

x = Ttable.Text

For a = 1 To 10

a = a + 1

b = a * x

treponse.Text = treponse.Text + Str(b) + " - "

Next a

End Sub

http://chtiloveur.skyblog.com

2 réponses

jpleroisse Messages postés 1788 Date d'inscription mardi 7 novembre 2000 Statut Membre Dernière intervention 11 mars 2006 27
5 oct. 2005 à 00:47
Bonsoir,

Si tu mets 2 dans Ttable.Text, tu auras dans treponse.Text (2-4-6-8-etc...20.)



Private Sub Command1_Click()

Dim a, x, b

a = 1

x = Ttable.Text

For a = 1 To 10

b = a * x

treponse.Text = treponse.Text + Str(b) + " - "

Next a

End Sub



jpleroisse



Si une réponse vous convient, cliquez Réponse Acceptée.
3
sosodef88 Messages postés 78 Date d'inscription jeudi 17 février 2005 Statut Membre Dernière intervention 26 décembre 2005
5 oct. 2005 à 00:49
salut voici la solution a ton probleme.... il faut juste faire LA BOUCLE * TABLE DE MULTIPLICATION , ici c'est a*t

*************************
Dim A As Integer, T As Integer, B As String


T = 2 'Table de multiplication


For A = 1 To 10
B = B & " " & A * T
Next A


MsgBox Trim(B) 'La fonction trim te permettra d'enlever le petit espace qui se trouve devant mais t'es pas obliger de le mettre...

***************************
0
Rejoignez-nous