Option Explicit Sub permit() Dim nom As String Dim A As Integer Dim B As Integer Dim C As Integer Dim Moyenne As Integer nom = InputBox("Ecrire votre nom") A = InputBox("1ere note ?") B = InputBox("2eme note ?") C = InputBox("3eme note ?") If A >= B And C >= B Then Moyenne = (A + C) / 2 Else If B >= C And A >= C Then Moyenne = (A + B) / 2 Else If C >= A And B >= A Then Moyenne = (B + C) / 2 End If End If End If MsgBox ("Votre moyenne est " & Moyenne) End Sub