Se connecter

Spectre Supreme

Sujet : VB20008
1
Transgohan
Niveau 9
24 juin 2009 à 12:07:40

Public Class frmprogramme3

Private Sub frmprogramme3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

lblidentite.Visible = False
lblExamens.Visible = False
lblTotal.Visible = False
lblAverage.Visible = False

End Sub

Private Sub cmdCotes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCalcul.Click
Dim nomeleve As String
Dim cotes As Integer
Dim nombreExamens As Integer
Dim total As Integer
Dim moyenne As Integer

total = 0
moyenne = 0

nomeleve = InputBox("Veuillez entrer le nom de l'élève")
nombreExamens = InputBox("Veuillez entrer le nombre d'examen")

For i = 1 To nombreExamens
cotes = InputBox("Veuillez entrer la cote de l'examen")
total = total + cotes

Next

moyenne = total / nombreExamens

lblidentite.Text = nomeleve
lblExamens.Text = nombreExamens
lblTotal.Text = total
lblAverage.Text = moyenne

lblidentite.Visible = True
lblExamens.Visible = True
lblTotal.Visible = True
lblAverage.Visible = True

End Sub

Private Sub cmdQuitter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdQuitter.Click
End
End Sub
End Class

1
Sujet : VB20008
   Retour haut de page
Consulter la version web de cette page