Algoritmia - cajero automatico bien interactivo

 
Vista:

cajero automatico bien interactivo

Publicado por urgente (2 intervenciones) el 22/03/2006 17:14:10
porfavor necesito las formulas para poder programarlo
es urgente para poder gananar laboratorio
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:cajero automatico bien interactivo

Publicado por Jorge Alveiro (2 intervenciones) el 25/03/2006 04:28:10
cajero que genera la cantidad de biilletes de acuerdo a un monto en efectivo
"Codigo de visual basic 6.0!"


Dim m500 As String, m200 As String, m100 As String, m50 As String, m20 As String
Dim cd As Double
Dim x50 As String, x20 As String, x10 As String, x5 As String, x2 As String, x1 As String
Dim b50 As String, b20 As String, b10 As String, b5 As String, b2 As String, b1 As String

Private Sub Command1_Click()
cd = Val(Text1.Text)
b50 = cd / 50000
x50 = Int(b50) * 50000
b20 = (Int(cd) - Int(x50)) / 20000
x20 = Int(b20) * 20000
b10 = ((Int(cd) - Int(x50)) - Int(x20)) / 10000
x10 = Int(b10) * 10000
b5 = (((Int(cd) - Int(x50)) - Int(x20)) - Int(x10)) / 5000
x5 = Int(b5) * 5000
b2 = ((((Int(cd) - Int(x50)) - Int(x20)) - Int(x10)) - Int(x5)) / 2000
x2 = Int(b2) * 2000
b1 = (((((Int(cd) - Int(x50)) - Int(x20)) - Int(x10)) - Int(x5)) - Int(x2)) / 1000
Text2 = Int(b50)
Text3 = Int(b20)
Text4 = Int(b10)
Text5 = Int(b5)
Text6 = Int(b2)
Text7 = Int(b1)

End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text1.SetFocus

End Sub

Private Sub Form_Load()

End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar