Tesis

Páginas: 4 (755 palabras) Publicado: 9 de marzo de 2012
Realizar un programa que permita calcular el promedio general de un curso utilizando ciclos y MsgBox e InputBox.

[pic]

Dim a As String

Dim sum As Integer

Dim i As Integer

Dim promedio AsSingle

Dim b As Integer



Private Sub Command1_Click()

b = Text1.Text

promedio = 0

sum = 0

For i = 1 To b

a = InputBox("INGRESE LA NOTA DEL ALUMNO " & i, "Notas")

sum = sum + Val(a)

Next ipromedio = sum / b

MsgBox "El promedio de la seccion es: " & promedio, vbInformation + vbOKOnly, "Resultado"

End Sub



Private Sub Command2_Click()

End

End Sub



Private Sub Form_Load()Command1.Enabled = False



End Sub



Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii <> Asc("9") Then

If KeyAscii <> Asc("8") Then

If KeyAscii <> Asc("7") Then

If KeyAscii <> Asc("6") Then

IfKeyAscii <> Asc("5") Then

If KeyAscii <> Asc("4") Then

If KeyAscii <> Asc("3") Then

If KeyAscii <> Asc("2") Then

If KeyAscii <> Asc("1") Then

If KeyAscii <> Asc("0") Then

If KeyAscii <> 8 Then

IfKeyAscii <> 32 Then

If KeyAscii <> 13 Then



KeyAscii = 0

End If

End If

End If

End If

End If

End If

End If

End If

End If

End If

End If

End If

End If

Select Case KeyAscii

Case 13

IfText1.Text <> "" Then

Command1.Enabled = True

Command1.SetFocus

Else

MsgBox "Debe ingresar un numero", vbInformation + vbOKOnly, "Error"

Text1.SetFocus

End If

Case 27

Text1.Text = ""

EndSelect

End Sub



























Realizar un programa que permita utilizar operaciones matemáticas, timer y otras herramientas de visual .

[pic]

Option Explicit

Dim m_lfVX As Double

Dimm_lSentidoX As Long

Dim m_lfVY As Double

Dim m_lSentidoY As Long

Dim m_lfX As Double

Dim m_lfY As Double

Dim m_lfTimeStep As Double

'Dim m_lfVel As Double

Dim m_lfMaxX As Double

Dim m_lfMaxY AsDouble

Dim m_lfMinX As Double

Dim m_lfMinY As Double

Dim m_lfWall As Double

Dim m_bChoqueXMax As Boolean

Dim m_bChoqueXMin As Boolean

Dim m_bChoqueYMax As Boolean

Dim m_bChoqueYMin As Boolean...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Tesis
  • Tesis
  • Tesis
  • Tesis
  • Tesis
  • Mi Tesis
  • Tesis
  • Tesis

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS