Páginas

Hallar el promedio de tres notas

Hallar el promedio de tres notas en consola

Imports System.Console
Module Module1
    Dim Nota1, Nota2, Nota3, PROM As Decimal
    Sub Main()
        Title = "ALFONSO"
        SetCursorPosition(15, 2)
        ForegroundColor = ConsoleColor.DarkYellow

        WriteLine("PROMEDIO DE 3 NOTAS")
        WriteLine()
        ResetColor()
        Write("ingrese Nota 1: ")
        Nota1 = ReadLine()
        Write("ingrese Nota 2: ")
        Nota2 = ReadLine()
        Write("ingrese Nota 3: ")
        Nota3 = ReadLine()
        PROM = (Nota1 + Nota2 + Nota3) / 3
        WriteLine()
        If (PROM > 10.5) Then
            ForegroundColor = ConsoleColor.Blue
            WriteLine("APROBADO")
        Else
            WriteLine()
            Console.ForegroundColor = ConsoleColor.Red
            WriteLine("DESAPROBADO")
        End If
        WriteLine()
        Console.ForegroundColor = ConsoleColor.Green
        WriteLine("PULSE ENTER PARA CONTINUAR....")
        ReadLine()
    End Sub
End Module

No hay comentarios:

Publicar un comentario