Programacion de una panaderia en visual basic 6

Solo disponible en BuenasTareas
  • Páginas : 2 (419 palabras )
  • Descarga(s) : 0
  • Publicado : 27 de mayo de 2011
Leer documento completo
Vista previa del texto
Option Explicit
Private Sub form_load()
Form1.WindowState = 0
Form1.Visible = True
Dim opc As Integer, pan1 As Integer
Dim a As Single, b As Single, c As Single, d As Single, e As Single, f AsSingle, pagar As Single, pan1_pagar As Single
Dim pan2 As Single, pan2_pagar As Single
Dim pan3 As Single, pan3_pagar As Single
Dim pan4 As Single, pan4_pagar As Single
Dim pan5 As Single,pan5_pagar As Single
Dim pan6 As Single, pan6_pagar As Single
Dim T As Single, x As Single, y As Single

b1:
Cls
Print ("menu de dias")
Print ("[1].-lunes")
Print ("[2].-martes")
Print("[3].-miercoles")
Print ("[4].-jueves")
Print ("[5].-virnes")
Print ("[6].-salir del programa")
opc = InputBox("elegir la opcion del 1 al 6")

If opc = 1 Then
GoTo a1
ElseIf opc = 2 Then
GoTo a2
ElseIfopc = 3 Then
GoTo a3
ElseIf opc = 4 Then
GoTo a4
ElseIf opc = 5 Then
GoTo a5
ElseIf opc = 6 Then
End
End If

a1:
Cls
Print ("dia lunes")
Print ("[1].-pan tipo1")
Print ("[2].-pan tipo2")Print ("[3].-pan tipo3")
Print ("[4].-pan tipo4")
Print ("[5].-pan tipo5")
Print ("[6].-pan tipo6")
Print ("[7].-cobrar")
Print ("[8].-pasar al siguiente dia")
opc = InputBox("elegir la opciondel 1 al 8")

If opc = 1 Then
pan1 = InputBox("cuantos tipos de panes tipo1")
a = 2
pagar = a * pan1
pan1_pagar = pagar
Print "cantidad a pagar"; pagar
GoTo a1

ElseIf opc = 2 Then
pan1 =InputBox("cuantos tipos de panes tipo2")
b = 4
pagar = b * pan2
pan2_pagar = pagar
Print "cantidad a pagar"; pagar
GoTo a1

ElseIf opc = 3 Then
pan1 = InputBox("cuantos tipos de panes tipo3")c = 2
pagar = c * pan3
pan3_pagar = pagar
Print "cantidad a pagar"; pagar
GoTo a1

ElseIf opc = 4 Then
pan1 = InputBox("cuantos tipos de panes tipo4")
d = 2
pagar = d * pan4
pan4_pagar =pagar
Print "cantidad a pagar"; pagar
GoTo a1

ElseIf opc = 5 Then
pan1 = InputBox("cuantos tipos de panes tipo5")
e = 2
pagar = e * pan5
pan5_pagar = pagar
Print "cantidad a pagar"; pagar...
tracking img