0% found this document useful (0 votes)
12 views2 pages

Console Consolecolor Console Console Console

The document describes a Visual Basic program that asks the user to input two numbers, compares them, and outputs the greater and lesser numbers. It prompts the user to enter the first number, sets it as the initial greatest and least, then prompts for the second number. It compares the numbers, updates the greatest and least variables if needed, and prints out the final greatest and least numbers.

Uploaded by

asanzasantacruz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Console Consolecolor Console Console Console

The document describes a Visual Basic program that asks the user to input two numbers, compares them, and outputs the greater and lesser numbers. It prompts the user to enter the first number, sets it as the initial greatest and least, then prompts for the second number. It compares the numbers, updates the greatest and least variables if needed, and prints out the final greatest and least numbers.

Uploaded by

asanzasantacruz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Module Module1

Sub Main()
Console.ForegroundColor = ConsoleColor.Cyan
Console.WriteLine("ingrese el primer numero: ")
Dim num1 As Integer = Console.ReadLine()
Console.WriteLine()
Dim mayor As Integer = num1
Dim menor As Integer = num1
Console.WriteLine("Ingrese el segundo numero: ")
Dim num2 As Integer = Console.ReadLine()
Console.WriteLine()
If num2 > MAYOR Then
MAYOR = num2
ElseIf num2 < menor Then
menor = num2
End If
Console.WriteLine("_______________________________")
Console.WriteLine()
Console.WriteLine()
Console.WriteLine("El numero mayor es: " & MAYOR)
Console.WriteLine()
Console.WriteLine("El numero menor es: " & menor)
Console.ReadKey()
End Sub
End Module

You might also like