Algoritmos

Páginas: 2 (348 palabras) Publicado: 14 de noviembre de 2012
Búsqueda Múltiple
Se tienen 2 tablas: alumnos.DBF, cursos.DBF . Se pide hallar el algoritmo que ingrese el apellido materno y el apellido paterno, que me muestre el listado tipo OAGRA de todosaquellos alumnos que se encuentren en esa clase. La tabla alumnos debe tener los sgts campos:
* cod_alum
* ap_pat
* ap_mat
* nombres
* dirección
* teléfono
* correo
En la tablacursos se busca mostrar todos aquellos cursos que el numero de créditos sea superior a 4, los campos son:
* cod_curso
* escuela
* facultad
* curso
* créditos
* currícula
*horas teóricas
* horas practicas
* horas laboratorio

PRIMER ALGORITMO
K=0
Dato_ap_pat= space (20); Dato_ap_mat= space (20)
Input “Ingrese apellido paterno”; Dato_ap_pat
Input “Ingreseapellido materno”; Dato_ap_mat
Use alumnos.DBF
Go top
Do while not eof ()
If [(Dato_ap_pat=ap_pat) and (Dato_ap_mat=ap_mat)]
Gotoxy (1+k , 1) Print cod_alum
Gotoxy (1+k , 11) Print ap_patGotoxy (1+k , 33) Print ap_mat
Gotoxy (1+k , 55) Print nombres
Gotoxy (1+k , 77) Print direccion
Gotoxy (1+k , 100) Print telefono
Gotoxy (1+k , 108) Print correo
K=k+1
Do paso
Else
Do paso
End ifEnd while
PASO
If eof()
Exit
Else
Skip
End if
PRUEBA ESCRITORIO

eof()
eof()

eof()

eof()

eof()
eof()

eof()
eof()
Pasando por alto la dirección, teléfono, correo y elcontador k=k+1. Hacemos el Do paso.
eof()
Luego End while y empezamos denuevo hasta eof().
SEGUNDO ALGORITMO
M=0
Use cursos.DBF
Go top
Do while not eof()
If créditos > 4
Gotoxy (1+M, 1) Printcreditos
Gotoxy (1+M, 6) Print escuela
Gotoxy (1+M, 11) Print facultad
Gotoxy (1+M, 16) Print curso
Gotoxy (1+M, 56) Print cod_curso
Gotoxy (1+M, 58) Print curricula
Gotoxy (1+M, 64) Print HTGotoxy (1+M, 66) Print HP
Gotoxy (1+M, 68) Print HL
M=M+1
Do paso
Else
Do paso
End if
End while
PASO
If eof()
Exit
Else
Skip
End if


Eof()
Eof()

Eof()
Eof()

Eof()
Eof()...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Algoritmo
  • Algoritmo
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS