Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

3) Procedure divisin Accept p_lapso Open imput Proyecto de Carrera, Carreras Cursadas, Notas, estudiantes. .

Move n to Archi_1 Perfom until archi_1 = s Read Proyecto de Carrera, at end move s to Archi_1 end read If Archi_1 = n then Move Nombre_carrera to carrera(i) of vector Move n to Archi_2 Perfom until archi_1 = s Read Carreras Cursadas, at end move s to Archi_2 end read If Archi_1 = n then Move p_lapso to c_lapso_NOTAS Move c_cedula_Carreras Cursadas to c_cedila_NOTAS Move c_cod_carrera_PROYECTODECARRERA to c_cod_carrera_NOTAS Star NOTAS key is = clave1 Not invalid key Perform until sw = 0 Read NOTAS, next record If P_lapso = c_cedila_NOTAS and c_cod_carrera_PROYECTODECARRERA = c_cod_carrera_NOTAS and c_cedula_Carreras Cursadas = c_cedila_NOTAS then Add c_nota_NOTAS to acum Add 1 to cont Else Move 0 to sw End perform Compute promedio = acum / cont Move 0 to acum Move 0 to cont If promedio > mayor_promedio then Move promedio to mayor_promedio Move c_cedula_CARRERAS CURSADAS to cedula End if End if End perfom Add 1 to I Move cedula to c_cedula_ESTUDIANTES Read Estudiantes Display c_Nombre_carrera_PROYECTODECARRERA, cedula, c_nombre_ESTUDIANTES, mayor_promedio, c_Nivel_estudiante_CARRERAS CURSADAS End if End perform Close Proyecto de Carrera, Carreras Cursadas, Notas, Estudiantes. Stop run.

4) Procedure Division Move 0 to i Move 0 to k Open imput Carreras cursadas, Notas, Asignatura. Move n to Archi_1 Perfom until archi_1 = s Read Carreras Cursadas, at end move s to Archi_1 end read If Archi_1 = n and c_Estatus_CARRERASCURSADAS = Activo then Move c_cedula_CARRERAS CURSADAS to c_cedula_NOTAS Star Notas Key is = c_cedula_CARRERAS CURSADAS Perform until sw = 0 If c_cedula_CARRERAS CURSADAS = c_cedula_NOTAS then Move c_ Nota_NOTAS to notas(i) of vector Move c_Cod_asign_NOTAS to materia(i) of vector Add 1 to i Else Move 0 to sw End perform Perform until k > i Move material(i) to c_cod_asign_ASIGNAtURA Read ASIGNATURA Compute suma1 = suma1 + (nota(i) * c_cant_uc_ASIGNATURA) add cant uc to suma2 Add 1 to i End perform Move suma1/suma2 to c_indice_acad_CARRERAS CURSADAS Rewrite CARRERAS CURSADAS Move 0 to i Move 0 to k End if End perform Close Carreras cursadas, Notas, Asignatura. Stop run.

7) Procedure divisin Accept p_lapso Open imput Carreras Cursadas, Notas, Asigntura Move n to Archi_1 Perfom until archi_1 = s Read Sedes, at end move s to Archi_1 end read If Archi_1 = n then Move n to archi_2 Perform until archi_2 = s Read Carreras Cursadas, at end move s to Archi_2 end read If Archi_2 = n then Move p_lapso to c_lapso_NOTAS Move c_cod_sede_SEDES to c_cod_sedes_NOTAS Move c_cedula_CARRERAS CURSADAS to c_cedula_NOTAS Star NOTAS key is = clave1 Not invalid key Perform until sw = 0 Read NOTAS, next record If p_lapso = c_lapso_NOTAS and c_cod_sede_SEDES = c_cod_sedes_NOTAS and c_cedula_CARRERAS CURSADAS = c_cedula_NOTAS then Move c_cod_asign_NOTAS to c_cod_asign_ASIGNATURA Read ASIGNATURA Move c_cedula_CARRERAS CURSADAS to cedula(i) of vector Move c_Nivel_estudiante_CARRERAS CURSADAS to nivel(i) of vector Compute suma1 = c_nota_NOTAS * c_uc_ASIGNATURA Add c_uc_ASIGNATURA to suma2 Move suma1/suma2 to indice(i) of vector Add 1 to i Move 0 to suma1 Move 0 to suma2 Else Move 0 to sw End perform Perform varying k from 1 by 1 until k > (i) Perform varying j from 1 by 1 until j > (i) if indice(j + 1) > indice(j) then Move vector(j) to auxiliar Move vector(j + 1) to vector(j) Move auxiliar to vector(j + 1) End perform End perform End if End perform Move 0 to j Perform until j > 3 Move cedula(j) to c_cedula_ESTUDIANTES

Read ESTUDIANTES Display c_nombre_ESTUDIANTES, cedula(j), ndice(j), nivel(j). Add 1 to j End perfom Move 0 to i End if End perform Close Carreras Cursadas, Notas, Asigntura Stop run.

5) Procedure division Accept p_lapso Open input Carreras cursadas, Inscripciones, Planes de estudio Move n to Archi_1 Perfom until archi_1 = s Read Carreras cursadas, at end move s to Archi_1 end read If Archi_1 = n and c_estatus_CARRERAS CURSADAS = Activo then Move p_lapso to c_Lapso_INSCRIPCIONES Move c_cedula_CARRERAS CURSADAS to c_cedula_INSCRIPCIONES Star INSCRIPCIONES key is = clave1 Not invalid key Perform until sw = 0 Read INSCRIPCIONES, next record If p_lapso = c_Lapso_INSCRIPCIONES and c_cedula_CARRERAS CURSADAS = c_cedula_INSCRIPCIONES Move c_cod_asign_INSCRIPCIONES to c_cod asign_PLANES DE ESTUDIO Read Planes de estudio. Move 1 to ban Perform until j > i If c_semestre_PLANES DE ESTUDIO = nivel(j) of vector1 then Add 1 to veces(j) of vector1 Move 0 to ban End perform End if Add 1 to j End perform If ban = 1 then Move c_semestre_PLANES DE ESTUDIO to nivel(i) of vector1 Move 1 to veces(i) of vector1 Add 1 to i End if Move 0 to j Else Move 0 to sw End perform Perform varying k from 1 by 1 until k > (i) Perform varying j from 1 by 1 until j > (i) if veces(j + 1) of vector1 > veces(j) of vector1 then Move vector1(j) of vector1 to auxiliar Move vector1(j + 1) of vector1 to vector1(j) of vector1 Move auxiliar to vector1(j + 1) of vector1 End if if veces (j + 1) of vector1 = veces(j) of vector1 and nivel(j+1) of vector1 < nivel(j) of vector1 then Move vector1(j) of vector1 to auxiliar Move vector1(j + 1) of vector1 to vector1(j) of vector1

Move auxiliar to vector1(j + 1) of vector1 End if End perform End perform Move 0 to j Move 0 to k Move 0 to i Move nivel(i) of vector1 to nivel(q) of vector2 Move c_cedula_CARRERAS CURSADAS to cedula(q) of vector2 Add 1 to q End if End perform Perform varying k from 1 by 1 until k > (q) Perform varying j from 1 by 1 until j > (q) if nivel(j + 1) of vector2 > nivel(j) of vector2 then Move vector2(j) of vector2 to auxiliar Move vector2(j + 1) of vector2 to vector2(j) of vector2 Move auxiliar to vector2(j + 1) of vector2 End if End perform End perform Perform varying k from 1 by 1 until j > (q) Display nivel(j) of vector2, cedula(j) of vector 2 End perform Close Carreras cursadas, Inscripciones, Planes de estudio Stop run.

You might also like