Programacion basica con visual fox 9.0

Solo disponible en BuenasTareas
  • Páginas : 3 (513 palabras )
  • Descarga(s) : 0
  • Publicado : 8 de mayo de 2011
Leer documento completo
Vista previa del texto
EJERCICIO N1 (URBANIZACIÓN)
Private Sub Command1_Click()
met = Val(Text1.Text)
lote = Val(Text2.Text)
totm = met * 20
If lote = 1 Then
parc = totm * 50 / 100
tot = parc + totm
op =MsgBox("El Lote Cuesta" + Str(tot), vbOKOnly + vbInformation, "Venta Lote")
Else
If lote = 2 Then
parc = totm * 30 / 100
tot = parc + totm
op = MsgBox("El Lote Cuesta"+ Str(tot), vbOKOnly + vbInformation, "Venta Lote")
Else
If lote = 3 Then
parc = totm * 20 / 100
tot = parc + totm
op = MsgBox("ElLote Cuesta" + Str(tot), vbOKOnly + vbInformation, "Venta Lote")
End If
End If
End If
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End Sub

Private SubCommand2_Click()
res = MsgBox("Desea Finalizar el Programa?", vbYesNo + vbQuestion, "Finalizar")
If res = 6 Then
End
End If
End Sub

EJERCICIO N2(NUMERO INTERMEDIO)

Private SubCommand1_Click()
n1 = Val(Text1.Text)
n2 = Val(Text2.Text)
n3 = Val(Text3.Text)
If n1 > n2 And n1 < n3 Or n1 < n2 And n1 > n3 Then
op = MsgBox("El numero Intermedio es" + Str(n1), vbOKOnly +vbInformation, "Resultado")
Else
If n2 > n3 And n2 < n1 Or n2 < n3 And n2 > n1 Then
op = MsgBox("El numero Intermedio es" + Str(n2), vbOKOnly + vbInformation, "Resultado")Else
If n3 > n1 And n3 < n2 Or n3 < n1 And n3 > n2 Then
op = MsgBox("El numero Intermedio es" + Str(n3), vbOKOnly + vbInformation, "Resultado")
Else
Ifn1 = n2 And n1 = n3 And n2 = n3 Then
op = MsgBox("No existe numero Intermedio", vbOKOnly + vbInformation, "Resultado")
End If
End If
End If
End If
Text1.Text = ""Text2.Text = ""
Text3.Text = ""
Text1.SetFocus


End Sub

Private Sub Command2_Click()
res = MsgBox("Desea Finalizar el Programa?", vbYesNo + vbQuestion, "Finalizar")
If res = 6 Then
End...
tracking img