quinta-feira, 14 de outubro de 2010

ficha de trabalho numero 4 exercicio 2

Private Sub Command1_Click()
If Val(Text1.Text) < 6.5 Or Val(Text2.Text) < 6.5 Or Val(Text3.Text) < 6.5 Then
Label2.Caption = "Está reprovado"
ElseIf Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 < 10 Then
Label2.Caption = "Está reprovado"
ElseIf Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 >= 10 And Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 < 14 Then
Label2.Caption = "A sua nota será suficiente."
ElseIf Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 >= 14 And Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 < 16 Then
Label2.Caption = "A sua nota será bom."
ElseIf Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 >= 16 And Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 < 18 Then
Label2.Caption = "A sua nota será Bom."
ElseIf Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 >= 18 And Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) / 3 <= 20 Then
Label2.Caption = "A sua nota será Muito Bom."
Else
Label2.Caption = "Nota invalida."
End If
End Sub

Private Sub Command2_Click()
End
End Sub


Sem comentários:

Enviar um comentário