*INGRESAR TRES PARCIALES CALCULAR LA SUMA, EL PROMEDIO, SI APRUEBA, O SE QUEDA A RECUPERACION
*ADEMAS LA EQUIVALENCIA DE SEGUN LA SIGUIENTE TABLA:10 SOBRESALIENTE,9-8 MUY BUENA,7 BUENA, 6-1 INSUFICIENTE *
PUBLIC SUB Main()
DIM N1, N2, N3 AS Integer
PRINT "INGRESE NOTA UNO"
INPUT N1
PRINT " INGRESAR NOTA DOS"
INPUT N2
PRINT " INGRESAR NOTA TRES"
INPUT N3
PRINT "LA SUMA ES", Module1.SUMA(N1, N2, N3)
PRINT "EL PROMEDIO ES", Module1.PROMEDIO(N1, N2, N3)
PRINT "LA EQUILALENCIA ES", Module1.EQUIVALENCIA(N1, N2, N3)
PRINT "OBSERVACION", Module1.OBSERVACION(N1, N2, N3)
END
PUBLIC FUNCTION SUMA(v1 AS Integer, v2 AS Integer, v3 AS Integer) AS Integer
DIM su AS Integer
su = v1 + v2 + v3
RETURN su
END
PUBLIC FUNCTION PROMEDIO(v1 AS Integer, v2 AS Integer, v3 AS Integer) AS Integer
DIM prom AS Integer
prom = (v1 + v2 + v3) DIV 3
RETURN prom
END
PUBLIC FUNCTION EQUIVALENCIA(v1 AS Integer, v2 AS Integer, v3 AS Integer) AS String
DIM eq AS Integer
DIM e AS String
eq = (v1 + v2 + v3) DIV 3
IF (eq < e = "insuificiente" eq =" 7)" e = "BUENO" e = "muy BUENO" e = "SOBRESALIENTE" eq =" (v1" e = "REPROBADO" e = "RECUPERACION" e = "APRUEBA">
0 comentarios:
Publicar un comentario