1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| Sub niveau1()
Cells(7, 19).ClearContents
Cells(8, 19).ClearContents
Cells(9, 19).ClearContents
Cells(7, 19).Interior.Color = RGB(255, 255, 255)
Cells(8, 19).Interior.Color = RGB(255, 255, 255)
Cells(9, 19).Interior.Color = RGB(255, 255, 255)
Randomize
nombre_aleatoire = Int(5 * Rnd) + 1
If nombre_aleatoire = 1 Then
Cells(6, 19).Value = 0
rad = 0
Coss = 1
Sinn = 0
End If
If nombre_aleatoire = 2 Then
Cells(6, 19).Value = 30
rad = 52
Coss = racine3
Sinn = 1 / 2
End If
If nombre_aleatoire = 3 Then
Cells(6, 19).Value = 45
rad = 79
Coss = racine1
Sinn = racine1
End If
If nombre_aleatoire = 4 Then
Cells(6, 19).Value = 60
rad = 104
Coss = 1 / 2
Sinn = racine3
End If
If nombre_aleatoire = 5 Then
Cells(6, 19).Value = 90
rad = 157
Coss = 0
Sinn = 1
End If
End Sub
Sub termine()
If Cells(7, 19) = rad Then
Cells(7, 19).Interior.Color = RGB(0, 255, 0)
Else
Cells(7, 19).Interior.Color = RGB(255, 0, 0)
End If
'If Cells(8, 19) = Coss Then
'Cells(8, 19).Interior.Color = RGB(0, 255, 0)
'Else
'Cells(8, 19).Interior.Color = RGB(255, 0, 0)
'End If
'If Cells(9, 19) = Sinn Then
'Cells(9, 19).Interior.Color = RGB(0, 255, 0)
'Else
'Cells(9, 19).Interior.Color = RGB(255, 0, 0)
'End If
End Sub |
Partager