Pitagoras En Visual

Páginas: 3 (716 palabras) Publicado: 13 de julio de 2011
Module pitagoras

Sub Main()
Dim a, b, c As Integer
Dim n As Integer
Dim i As ConsoleKeyInfo

Console.BackgroundColor = ConsoleColor.DarkBlue
Console.Clear()
Console.Write(vbCrLf)Console.Write(vbTab & vbTab & "")
Console.BackgroundColor = ConsoleColor.DarkRed
Console.ForegroundColor = ConsoleColor.Yellow
Console.WriteLine("Programa Que Realiza Teorema de Pitagoras")Console.BackgroundColor = ConsoleColor.DarkBlue
Console.Write(vbTab & vbTab & "")
Console.BackgroundColor = ConsoleColor.DarkRed
Console.WriteLine("c² = b² + a² " & vbCrLf)Console.BackgroundColor = ConsoleColor.DarkBlue
Console.Write(vbTab & vbTab & "")
Console.BackgroundColor = ConsoleColor.DarkRed
Console.ForegroundColor = ConsoleColor.Yellow
Console.Write("Para poder calcular ellado deseado escoja")
Console.Write(vbCrLf)
Console.BackgroundColor = ConsoleColor.DarkBlue

Console.Write(vbTab & vbTab & "")
Console.BackgroundColor = ConsoleColor.DarkRedConsole.Write("un Lado ")
Console.ForegroundColor = ConsoleColor.Green
Console.Write(" a , b y c ")
Console.ForegroundColor = ConsoleColor.Yellow
Console.WriteLine(" equivalente al lado " & vbCrLf)Console.BackgroundColor = ConsoleColor.DarkBlue
Console.ForegroundColor = ConsoleColor.Yellow
Console.WriteLine(vbTab & "Lado a= vc² - b²" & vbCrLf & vbTab & "Lado b= vc² - a²" & vbCrLf & vbTab & "Lado c=va² + b²")


For n = 1 To 3
Console.ForegroundColor = ConsoleColor.Yellow
Console.Write(vbTab & "escoja el lado: ")
Console.ForegroundColor = ConsoleColor.Green
i = Console.ReadKey(True)Console.WriteLine("{0}" & vbCrLf, i.Key)
Console.Write(vbCrLf)
If i.Key = ConsoleKey.A Then

Console.Write(vbTab)
Console.ForegroundColor = ConsoleColor.Cyan
Console.Write("Lado b: ")Console.ForegroundColor = ConsoleColor.Magenta
b = Console.ReadLine
Console.Write(vbTab)
Console.ForegroundColor = ConsoleColor.Cyan
Console.Write("Lado c: ")
Console.ForegroundColor =...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Pitagora
  • pitagoras
  • Pitágoras y Los Pitagóricos
  • Pitágoras
  • Pitagoras
  • Pitagoras
  • pitagoras
  • Pitágoras

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS