Comment indiquer a vb de sortir d'une boucle for ?
(l'algoritme est bidon je sait...)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 For a = TextBox2.Text To TextBox3.Text For b = 2 To a - 1 c = a Mod b If c = 0 Then a = a + 1 'je voudrais sortir ici et retourner au premier for Else TextBox1.Text = TextBox1.Text & vbCrLf & a & " est un nombre premier" TextBox1.Refresh() End If Next Next
Partager