Algoritmo Sub ejercicioxd
Enviado por paola3gc • 22 de Abril de 2020 • Apuntes • 299 Palabras (2 Páginas) • 94 Visitas
Sub ejercicioxd()
Dim N(500), FN(100) As Double
Dim PA, NP, VM, CN, CM, NOTA As Double
Dim R, LNOTA As String
N(500) = 0
FN(100) = 0
CM = 500
PA = 0
NP = 0
VM = 0
CN = 0
R = " "
LNOTA = " "
Do
CN = CN + 1
Do
N(CN) = Val(InputBox("Ingrese la nota: "))
If (N(CN) < 0 Or N(CN) > 100) Then
MsgBox ("Ingrese la nota correctamente")
End If
Loop Until ((N(CN) >= 0) And (N(CN) <= 100))
If (CN = CM) Then
MsgBox ("Ya no puede ingresar más registros")
Else
R = InputBox("¿Desea continuar?")
End If
Loop Until (R = "No" Or CN = CM)
For I = 1 To (CN)
NOTA = N(I)
FN(NOTA) = FN(NOTA) + 1
NP = NP + NOTA
If (NOTA > 60) Then
PA = PA + 1
End If
Next I
NP = NP / CN
PA = PA / CN
For I = 0 To 100
If (FN(I) > VM) Then
VM = FN(I)
End If
Next I
For I = 0 To 100
If (FN(I) = VM) Then
LNOTA = LNOTA & I & ","
End
...