Top Banner
program Colegio; uses crt,printer,dos; type persona = record Nombre : string[15]; ap1 : string[15]; ap2 : string[15]; tel : string[9]; day : byte; month : byte; year : word; Dir : string; city : string; prov : string; end; alumno = record Nombre : string[15]; ape : string[15]; eda : string[15]; tel : string[9]; day : byte; month : byte; year : word; Dir : string;
77
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Program colegio

program Colegio;

uses crt,printer,dos;

type

persona = record

Nombre : string[15];

ap1 : string[15];

ap2 : string[15];

tel : string[9];

day : byte;

month : byte;

year : word;

Dir : string;

city : string;

prov : string;

end;

alumno = record

Nombre : string[15];

ape : string[15];

eda : string[15];

tel : string[9];

day : byte;

month : byte;

year : word;

Dir : string;

Page 2: Program colegio

curs : string;

turn : string;

end;

tape = record

Titulo : string[35];

tipo : char;

socio : word;

estado : byte;

price : word;

multa : word;

day2 : word;

month2 : word;

year2 : word;

end;

var

archivo1 : file of persona;

archivo2 : file of tape;

archivo3 : file of alumno;

cliente : persona;

estuden : alumno;

movie : tape;

opcion : char;

Page 3: Program colegio

a,b : byte;

dia : word;

mes : word;

ano : word;

dow : word;

car : word;

control : char;

day2p2 : byte;

monthaux : byte;

yearaux : word;

al : string;

n1 : Integer;

n2 : Integer;

n3 : Integer;

n4 : Integer;

n5 : Integer;

n6 : Integer;

acu : Integer;

prom : Real;

{*************************PROCEDURE

CUADRO**********************************}

procedure cuadro;

begin

textcolor (yellow);

gotoxy(25,6);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(25,7);

writeln ('º º');

Page 4: Program colegio

gotoxy(25,8);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(25,9);

writeln ('º º');

gotoxy(25,10);

writeln ('º º');

gotoxy(25,11);

writeln ('º º');

gotoxy(25,12);

writeln ('º º');

gotoxy(25,13);

writeln ('º º');

gotoxy(25,14);

writeln ('º º');

gotoxy(25,15);

writeln ('º º');

gotoxy(25,16);

writeln ('º º');

gotoxy(25,17);

writeln ('º º');

gotoxy(25,18);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

end;

{****************************PROCEDURE PRINT_CARNET*************************}

Page 5: Program colegio

Procedure print_carnet;

begin

assign(archivo1,'clientes.dat');

reset(Archivo1);

seek(Archivo1,filesize(Archivo1)-1);

read(archivo1,cliente);

car:= filesize(archivo1);

with cliente do

begin

writeln (lst,'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

writeln (lst);

writeln (lst,' * Changos Videoclub *');

writeln (lst);

writeln (lst,' ',nombre,' ',ap1);

writeln (lst);

writeln (lst,' # Carnet ',car);

writeln (lst);

writeln (lst,' Firma:__________________');

writeln (lst);

writeln (lst,'ÈÍÍÍÍÍVer sello al dorsoÍÍÍÍͼ');

writeln (lst);

writeln (lst,'.................................Corte Aqu¡....................................');

end;

end;

Page 6: Program colegio

{***************************PROCEDURE

NUEVO*********************************}

Procedure nuevo;

begin

assign(Archivo1,'clientes.dat');

reset(archivo1);

seek(archivo1,filesize(archivo1));

with cliente do

begin

repeat

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Ingrese Datos para Nuevo Socio :. ');

normvideo;

getdate(ano,mes,dia,dow);

day := dia;

month := mes;

year := ano;

gotoxy(1,3);

writeln ('Nombre: [ ] Fecha: [ / / ]');

gotoxy(42,3);

writeln (dia);

gotoxy(45,3);

if mes < 10 then

writeln ('0',mes)

else

Page 7: Program colegio

writeln (mes);

gotoxy(48,3);

writeln (ano);

gotoxy(1,5);

writeln ('1er Apellido: [ ]');

gotoxy(1,7);

writeln ('2do Apellido: [ ]');

gotoxy(1,9);

writeln ('Tel‚fono: * + (555 55 55)');

gotoxy(1,11);

writeln ('Direcci¢n: [ ]');

gotoxy(1,13);

writeln ('Ciudad: [ ] Provincia: [ ]');

gotoxy(1,15);

writeln ('# de Carnet: [ ]');

textcolor (lightblue);

gotoxy(10,3);

readln(nombre);

gotoxy(16,5);

readln(ap1);

gotoxy(16,7);

readln(ap2);

gotoxy(12,9);

readln (tel);

gotoxy(13,11);

readln (dir);

gotoxy(10,13);

Page 8: Program colegio

readln (city);

gotoxy(39,13);

readln (prov);

gotoxy(15,15);

textcolor (yellow);

writeln (filepos(archivo1)+1);

normvideo;

gotoxy(25,17);

textcolor (blue);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(25,18);

writeln ('º º');

gotoxy(25,19);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(25,20);

writeln ('º º');

gotoxy(25,21);

writeln ('º º');

gotoxy(25,22);

writeln ('º º');

gotoxy(25,23);

writeln ('º º');

gotoxy(25,24);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

gotoxy(28,18);

textcolor (yellow + blink);

Page 9: Program colegio

writeln ('SelecionarOpci¢n');

normvideo;

gotoxy(27,20);

writeln ('A) Imprimir Carnet');

gotoxy(27,22);

writeln ('B) Corregir Datos');

gotoxy (45,24);

readln (opcion);

if upcase(opcion) = 'A' then

begin

write(archivo1,cliente);

close(Archivo1);

print_carnet;

end;

until upcase(opcion) = 'A'

end;

end;

{***************************PROCEDRUE

MOD_SOCIOS****************************}

procedure mod_socios;

begin

control:= 'b';

repeat

clrscr;

textcolor (white);

Page 10: Program colegio

textbackground (blue);

writeln (' .: Tramitar :. ');

normvideo;

writeln;

writeln (' Digite Carnet: [ ]');

gotoxy(19,4);

textcolor (lightblue);

readln (car);

normvideo;

assign(archivo1,'clientes.dat');

reset(archivo1);

begin

while not eof(archivo1) do

begin

read(archivo1,cliente);

with cliente do

begin

if (car) = filepos(archivo1) then

begin

control := 'a';

gotoxy(3,6);

textcolor (yellow);

writeln (nombre,' ',ap1,' ',ap2);

normvideo;

gotoxy(3,8);

writeln ('Fecha de Afiliaci¢n: ');

Page 11: Program colegio

if month < 10 then

begin

gotoxy(24,8);

textcolor (lightblue);

writeln ('[',day,'/0',month,'/',year,']');

normvideo;

end

else

begin

gotoxy(24,8);

textcolor (lightblue);

writeln ('[',day,'/',month,'/',year,']');

normvideo;

end;

gotoxy(3,10);

writeln ('Tel‚fono: ');

gotoxy(13,10);

writeln (tel);

gotoxy(3,12);

writeln ('Direcci¢n: ');

gotoxy(3,14);

writeln (dir,', ',city,', ',prov);

repeat

gotoxy(50,4);

textcolor (blue);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(50,5);

Page 12: Program colegio

writeln ('º º');

gotoxy(50,6);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(50,7);

writeln ('º º');

gotoxy(50,8);

writeln ('º º');

gotoxy(50,9);

writeln ('º º');

gotoxy(50,10);

writeln ('º º');

gotoxy(50,11);

writeln ('º º');

gotoxy(50,12);

writeln ('º º');

gotoxy(50,13);

writeln ('º º');

gotoxy(50,14);

writeln ('º º');

gotoxy(50,15);

writeln ('º º');

gotoxy(50,16);

writeln ('º º');

gotoxy(50,17);

writeln ('º º');

gotoxy(50,18);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

Page 13: Program colegio

normvideo;

gotoxy(53,5);

textcolor (yellow);

writeln ('Selecionar Opci¢n');

normvideo;

gotoxy(52,7);

writeln ('A) Nombre');

gotoxy(52,9);

writeln ('B) 1er Apellido');

gotoxy(52,11);

writeln ('C) 2do Apellido');

gotoxy(52,13);

writeln ('D) Tel‚fono');

gotoxy(52,15);

writeln ('E) Direcci¢n');

gotoxy(52,17);

textcolor (blue);

writeln ('F) Socios...');

normvideo;

gotoxy (70,18);

readln (opcion);

case upcase(opcion) of

'A' :begin

gotoxy (3,18);

writeln ('Nuevo Nombre: [ ]');

gotoxy(18,18);

textcolor (lightblue);

Page 14: Program colegio

readln (nombre);

normvideo;

seek(archivo1,filepos(archivo1)-1);

write(archivo1,cliente);

gotoxy (3,18);

writeln (' ');

gotoxy(3,6);

writeln (' ');

gotoxy(3,6);

textcolor (yellow);

writeln (nombre,' ',ap1,' ',ap2);

end;

'B' : begin

gotoxy (3,18);

writeln ('Nuevo Apellido: [ ]');

gotoxy(20,18);

textcolor (lightblue);

readln (ap1);

normvideo;

seek(archivo1,filepos(archivo1)-1);

write(archivo1,cliente);

gotoxy (3,18);

writeln (' ');

gotoxy(3,6);

writeln (' ');

gotoxy(3,6);

textcolor (yellow);

Page 15: Program colegio

writeln (nombre,' ',ap1,' ',ap2);

end;

'C' : begin

gotoxy (3,18);

writeln ('Nuevo Apellido: [ ]');

gotoxy(20,18);

textcolor (lightblue);

readln (ap2);

normvideo;

seek(archivo1,filepos(archivo1)-1);

write(archivo1,cliente);

gotoxy (3,18);

writeln (' ');

gotoxy(3,6);

writeln (' ');

gotoxy(3,6);

textcolor (yellow);

writeln (nombre,' ',ap1,' ',ap2);

end;

'D' : begin

gotoxy (3,18);

writeln ('Nuevo Tel‚fono: * +');

gotoxy(20,18);

textcolor (lightblue);

readln (tel);

normvideo;

seek(archivo1,filepos(archivo1)-1);

Page 16: Program colegio

write(archivo1,cliente);

gotoxy (3,18);

writeln (' ');

gotoxy(3,10);

writeln (' ');

gotoxy(3,10);

writeln ('Tel‚fono: ');

gotoxy(13,10);

writeln (tel);

end;

'E' : begin

gotoxy (3,18);

writeln ('1) Direcci¢n [ ]');

writeln (' 2) Ciudad');

writeln (' 3) Provincia');

gotoxy(21,18);

textcolor (lightblue);

readln (opcion);

normvideo;

case upcase(opcion) of

'1' : begin

gotoxy (3,18);

writeln (' ');

writeln (' ');

writeln (' ');

gotoxy(3,18);

writeln ('Nueva Direcci¢n: [ ]');

Page 17: Program colegio

gotoxy(21,18);

textcolor (lightblue);

readln (dir);

normvideo;

seek(archivo1,filepos(archivo1)-1);

write(archivo1,cliente);

gotoxy (3,18);

writeln (' ');

gotoxy(3,14);

writeln (' ');

gotoxy(3,14);

writeln (dir,', ',city,', ',prov);

end;

'2' : begin

gotoxy (3,18);

writeln (' ');

writeln (' ');

writeln (' ');

gotoxy(3,18);

writeln ('Nueva Ciudad: [ ]');

gotoxy(18,18);

textcolor (lightblue);

readln (city);

normvideo;

seek(archivo1,filepos(archivo1)-1);

write(archivo1,cliente);

gotoxy (3,18);

Page 18: Program colegio

writeln (' ');

gotoxy(3,14);

writeln (' ');

gotoxy(3,14);

writeln (dir,', ',city,', ',prov);

end;

'3' : begin

gotoxy (3,18);

writeln (' ');

writeln (' ');

writeln (' ');

gotoxy(3,18);

writeln ('Nueva Provincia: [ ]');

gotoxy(21,18);

textcolor (lightblue);

readln (prov);

normvideo;

seek(archivo1,filepos(archivo1)-1);

write(archivo1,cliente);

gotoxy (3,18);

writeln (' ');

gotoxy(3,14);

writeln (' ');

gotoxy(3,14);

writeln (dir,', ',city,', ',prov);

end;

end;

Page 19: Program colegio

end;

end;

until upcase(opcion) = 'F'

end

end

end;

end;

until control= 'a';

end;

{****************************PROCEDURE PRINT_SOC****************************}

procedure print_soc;

begin

assign(archivo1,'clientes.dat');

reset(archivo1);

writeln (lst,' .: cat logo de clientes :.');

writeln

(lst,'**************************************************************************

***************');

writeln (lst,'Carnet Nombre');

writeln

(lst,'**************************************************************************

***************');

writeln (lst);

while not eof(archivo1) do

begin

Page 20: Program colegio

read(Archivo1,cliente);

with cliente do

begin

car:= filepos(archivo1);

writeln (lst,car:4,' ',nombre,' ',ap1,' ',ap2);

end;

end;

end;

{****************************PROCEDURE CATA_SOC*****************************}

procedure cat_soc;

begin

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Cat logo de Socios :. ');

normvideo;

gotoxy(1,2);

textcolor (red);

textbackground (lightgray);

writeln (' Carnet Nombre ');

normvideo;

assign(archivo1,'clientes.dat');

reset(archivo1);

a:= 3;

while not eof(archivo1) do

begin

Page 21: Program colegio

read(archivo1,cliente);

with cliente do

begin

a:= a+1;

car:= filepos(archivo1);

gotoxy(2,a);

writeln (car);

gotoxy(12,a);

writeln (nombre,' ',ap1,' ',ap2);

end;

end;

gotoxy(2,a+2);

writeln ('Desea Imprimir el cat logo de socios (s/n) [ ]');

gotoxy(46,a+2);

readln (opcion);

if upcase(opcion) = 'S' then

begin

print_soc;

clrscr;

gotoxy(30,12);

textcolor (white);

writeln ('Imprimiendo...');

delay(500);

normvideo;

end;

Page 22: Program colegio

end;

{*******************************PROCEDURE SOCIOS****************************}

Procedure socios;

begin

repeat

textcolor (lightgray);

clrscr;

gotoxy(25,4);

textcolor (blue);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(25,5);

writeln ('º º');

gotoxy(25,6);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(25,7);

writeln ('º º');

gotoxy(25,8);

writeln ('º º');

gotoxy(25,9);

writeln ('º º');

gotoxy(25,10);

writeln ('º º');

gotoxy(25,11);

writeln ('º º');

Page 23: Program colegio

gotoxy(25,12);

writeln ('º º');

gotoxy(25,13);

writeln ('º º');

gotoxy(25,14);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

gotoxy(28,5);

textcolor (yellow);

writeln ('Seleccionar Opci¢n');

normvideo;

gotoxy(28,7);

writeln ('A) A¤adir...');

gotoxy(28,9);

writeln ('B) Modificar...');

gotoxy(28,11);

writeln ('C) Cat logo...');

gotoxy(28,13);

textcolor (yellow);

writeln ('D) Principal...');

normvideo;

gotoxy (45,14);

readln (opcion);

case upcase(opcion) of

'A' : nuevo;

'B' :mod_socios;

'C' : cat_soc;

Page 24: Program colegio

end;

until upcase(opcion) = 'D'

end;

{***************************PROCEDURE

nuevoa*********************************}

Procedure nuevoa;

begin

assign(Archivo3,'alumnos.dat');

reset(archivo3);

seek(archivo3,filesize(archivo3));

with estuden do

begin

repeat

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Ingrese Datos para nuevoa Socio :. ');

normvideo;

getdate(ano,mes,dia,dow);

day := dia;

month := mes;

year := ano;

gotoxy(1,3);

Page 25: Program colegio

writeln ('Nombre: [ ] Fecha: [ / / ]');

gotoxy(42,3);

writeln (dia);

gotoxy(45,3);

if mes < 10 then

writeln ('0',mes)

else

writeln (mes);

gotoxy(48,3);

writeln (ano);

gotoxy(1,5);

writeln ('Apellido: [ ]');

gotoxy(1,7);

writeln (' Edad: [ ]');

gotoxy(1,9);

writeln ('Tel‚fono: * + (555 55 55)');

gotoxy(1,11);

writeln ('Direcci¢n: [ ]');

gotoxy(1,13);

writeln ('edaso: [ ] Turno: [ ]');

gotoxy(1,15);

writeln ('# de Carnet: [ ]');

textcolor (lightblue);

gotoxy(10,3);

readln(nombre);

gotoxy(16,5);

readln(ape);

Page 26: Program colegio

gotoxy(16,7);

readln(eda);

gotoxy(12,9);

readln (tel);

gotoxy(13,11);

readln (dir);

gotoxy(10,13);

readln (curs);

gotoxy(39,13);

readln (turn);

gotoxy(15,15);

textcolor (yellow);

writeln (filepos(Archivo3)+1);

normvideo;

gotoxy(25,17);

textcolor (blue);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(25,18);

writeln ('º º');

gotoxy(25,19);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(25,20);

writeln ('º º');

gotoxy(25,21);

writeln ('º º');

gotoxy(25,22);

writeln ('º º');

Page 27: Program colegio

gotoxy(25,23);

writeln ('º º');

gotoxy(25,24);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

gotoxy(28,18);

textcolor (yellow + blink);

writeln ('SelecionarOpci¢n');

normvideo;

gotoxy(27,20);

writeln ('A) Imprimir Carnet');

gotoxy(27,22);

writeln ('B) Corregir Datos');

gotoxy (45,24);

readln (opcion);

if upcase(opcion) = 'A' then

begin

write(archivo3,estuden);

close(archivo3);

print_carnet;

end;

until upcase(opcion) = 'A'

end;

end;

{***************************PROCEDRUE mod_studen****************************}

Page 28: Program colegio

procedure mod_studen;

begin

control:= 'b';

repeat

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Tramitar :. ');

normvideo;

writeln;

writeln (' Digite Carnet: [ ]');

gotoxy(19,4);

textcolor (lightblue);

readln (car);

normvideo;

assign(Archivo3,'alumnos.dat');

reset(Archivo3);

begin

while not eof(Archivo3) do

begin

read(Archivo3,estuden);

with estuden do

begin

if (car) = filepos(Archivo3) then

begin

Page 29: Program colegio

control := 'a';

gotoxy(3,6);

textcolor (yellow);

writeln (nombre,' ',ape,' ',eda);

normvideo;

gotoxy(3,8);

writeln ('Fecha de Afiliaci¢n: ');

if month < 10 then

begin

gotoxy(24,8);

textcolor (lightblue);

writeln ('[',day,'/0',month,'/',year,']');

normvideo;

end

else

begin

gotoxy(24,8);

textcolor (lightblue);

writeln ('[',day,'/',month,'/',year,']');

normvideo;

end;

gotoxy(3,10);

writeln ('Tel‚fono: ');

gotoxy(13,10);

writeln (tel);

gotoxy(3,12);

writeln ('Direcci¢n: ');

Page 30: Program colegio

gotoxy(3,14);

writeln (dir,', ',curs,', ',turn);

repeat

gotoxy(50,4);

textcolor (blue);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(50,5);

writeln ('º º');

gotoxy(50,6);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(50,7);

writeln ('º º');

gotoxy(50,8);

writeln ('º º');

gotoxy(50,9);

writeln ('º º');

gotoxy(50,10);

writeln ('º º');

gotoxy(50,11);

writeln ('º º');

gotoxy(50,12);

writeln ('º º');

gotoxy(50,13);

writeln ('º º');

gotoxy(50,14);

writeln ('º º');

gotoxy(50,15);

Page 31: Program colegio

writeln ('º º');

gotoxy(50,16);

writeln ('º º');

gotoxy(50,17);

writeln ('º º');

gotoxy(50,18);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

gotoxy(53,5);

textcolor (yellow);

writeln ('Selecionar Opci¢n');

normvideo;

gotoxy(52,7);

writeln ('A) Nombre');

gotoxy(52,9);

writeln ('B) 1er Apellido');

gotoxy(52,11);

writeln ('C) Edad');

gotoxy(52,13);

writeln ('D) Tel‚fono');

gotoxy(52,15);

writeln ('E) Direcci¢n');

gotoxy(52,17);

textcolor (blue);

writeln ('F) Alumno.');

normvideo;

gotoxy (70,18);

Page 32: Program colegio

readln (opcion);

case upcase(opcion) of

'A' : begin

gotoxy (3,18);

writeln ('nuevoa Nombre: [ ]');

gotoxy(18,18);

textcolor (lightblue);

readln (nombre);

normvideo;

seek(Archivo3,filepos(Archivo3)-1);

write(Archivo3,estuden);

gotoxy (3,18);

writeln (' ');

gotoxy(3,6);

writeln (' ');

gotoxy(3,6);

textcolor (yellow);

writeln (nombre,' ',ape,' ',eda);

end;

'B' : begin

gotoxy (3,18);

writeln ('nuevoa Apellido: [ ]');

gotoxy(20,18);

textcolor (lightblue);

readln (ape);

normvideo;

seek(Archivo3,filepos(Archivo3)-1);

Page 33: Program colegio

write(Archivo3,estuden);

gotoxy (3,18);

writeln (' ');

gotoxy(3,6);

writeln (' ');

gotoxy(3,6);

textcolor (yellow);

writeln (nombre,' ',ape,' ',eda);

end;

'C' : begin

gotoxy (3,18);

writeln ('nueva Edad: [ ]');

gotoxy(20,18);

textcolor (lightblue);

readln (eda);

normvideo;

seek(Archivo3,filepos(Archivo3)-1);

write(Archivo3,estuden);

gotoxy (3,18);

writeln (' ');

gotoxy(3,6);

writeln (' ');

gotoxy(3,6);

textcolor (yellow);

writeln (nombre,' ',ape,' ',eda);

end;

'D' : begin

Page 34: Program colegio

gotoxy (3,18);

writeln ('nuevoaTel‚fono: * +');

gotoxy(20,18);

textcolor (lightblue);

readln (tel);

normvideo;

seek(Archivo3,filepos(Archivo3)-1);

write(Archivo3,estuden);

gotoxy (3,18);

writeln (' ');

gotoxy(3,10);

writeln (' ');

gotoxy(3,10);

writeln ('Tel‚fono: ');

gotoxy(13,10);

writeln (tel);

end;

'E' : begin

gotoxy (3,18);

writeln ('1) Direcci¢n [ ]');

writeln (' 2) curso');

writeln (' 3) Turno');

gotoxy(21,18);

textcolor (lightblue);

readln (opcion);

normvideo;

case upcase(opcion) of

Page 35: Program colegio

'1' : begin

gotoxy (3,18);

writeln (' ');

writeln (' ');

writeln (' ');

gotoxy(3,18);

writeln ('Nueva Direcci¢n: [ ]');

gotoxy(21,18);

textcolor (lightblue);

readln (dir);

normvideo;

seek(Archivo3,filepos(Archivo3)-1);

write(Archivo3,estuden);

gotoxy (3,18);

writeln (' ');

gotoxy(3,14);

writeln (' ');

gotoxy(3,14);

writeln (dir,', ',curs,', ',turn);

end;

'2' : begin

gotoxy (3,18);

writeln (' ');

writeln (' ');

writeln (' ');

gotoxy(3,18);

writeln ('Nuevo Curso: [ ]');

Page 36: Program colegio

gotoxy(18,18);

textcolor (lightblue);

readln (curs);

normvideo;

seek(Archivo3,filepos(Archivo3)-1);

write(Archivo3,estuden);

gotoxy (3,18);

writeln (' ');

gotoxy(3,14);

writeln (' ');

gotoxy(3,14);

writeln (dir,', ',curs,', ',turn);

end;

'3' : begin

gotoxy (3,18);

writeln (' ');

writeln (' ');

writeln (' ');

gotoxy(3,18);

writeln ('Nueva Turno: [ ]');

gotoxy(21,18);

textcolor (lightblue);

readln (turn);

normvideo;

seek(Archivo3,filepos(Archivo3)-1);

write(Archivo3,estuden);

gotoxy (3,18);

Page 37: Program colegio

writeln (' ');

gotoxy(3,14);

writeln (' ');

gotoxy(3,14);

writeln (dir,', ',curs,', ',turn);

end;

end;

end;

end;

until upcase(opcion) = 'F'

end

end

end;

end;

until control= 'a';

end;

{****************************PROCEDURE print_alu****************************}

procedure print_alu;

begin

assign(Archivo3,'alumnos.dat');

reset(Archivo3);

writeln (lst,' .: cat logo de alumnos :.');

Page 38: Program colegio

writeln

(lst,'**************************************************************************

***************');

writeln (lst,'Carnet Nombre');

writeln

(lst,'**************************************************************************

***************');

writeln (lst);

while not eof(Archivo3) do

begin

read(Archivo3,estuden);

with estuden do

begin

car:= filepos(Archivo3);

writeln (lst,car:4,' ',nombre,' ',ape,' ',eda);

end;

end;

end;

{****************************PROCEDURE CATA_SOC*****************************}

procedure cat_alu;

begin

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Cat logo de estudiantes :. ');

normvideo;

gotoxy(1,2);

textcolor (red);

Page 39: Program colegio

textbackground (lightgray);

writeln (' Carnet Nombre ');

normvideo;

assign(Archivo3,'alumnos.dat');

reset(Archivo3);

a:= 3;

while not eof(Archivo3) do

begin

read(Archivo3,estuden);

with estuden do

begin

a:= a+1;

car:= filepos(Archivo3);

gotoxy(2,a);

writeln (car);

gotoxy(12,a);

writeln (nombre,' ',ape,' ',eda);

end;

end;

gotoxy(2,a+2);

writeln ('Desea Imprimir el cat logo de estudiantes (s/n) [ ]');

gotoxy(46,a+2);

readln (opcion);

if upcase(opcion) = 'S' then

begin

print_alu;

clrscr;

Page 40: Program colegio

gotoxy(30,12);

textcolor (white);

writeln ('Imprimiendo...');

delay(500);

normvideo;

end;

end;

{*******************************PROCEDURE

estudiantes****************************}

Procedure estudiantes;

begin

repeat

textcolor (lightgray);

clrscr;

gotoxy(25,4);

textcolor (blue);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(25,5);

writeln ('º º');

gotoxy(25,6);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(25,7);

writeln ('º º');

Page 41: Program colegio

gotoxy(25,8);

writeln ('º º');

gotoxy(25,9);

writeln ('º º');

gotoxy(25,10);

writeln ('º º');

gotoxy(25,11);

writeln ('º º');

gotoxy(25,12);

writeln ('º º');

gotoxy(25,13);

writeln ('º º');

gotoxy(25,14);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

gotoxy(28,5);

textcolor (yellow);

writeln ('Seleccionar Opci¢n');

normvideo;

gotoxy(28,7);

writeln ('A) A¤adir...');

gotoxy(28,9);

writeln ('B) Modificar...');

gotoxy(28,11);

writeln ('C) Cat logo...');

gotoxy(28,13);

textcolor (yellow);

Page 42: Program colegio

writeln ('D) Principal...');

normvideo;

gotoxy (45,14);

readln (opcion);

case upcase(opcion) of

'A' : nuevoa;

'B' : mod_studen;

'C' : cat_alu;

end;

until upcase(opcion) = 'D'

end;

{*************************PROCEDURE

COMPARAR********************************}

Procedure comparar;

begin

control:= 'b';

repeat

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Tramitar :. ');

normvideo;

writeln;

Page 43: Program colegio

writeln (' Digite Carnet: [ ]');

gotoxy(19,4);

textcolor (lightblue);

readln (car);

normvideo;

assign(archivo1,'clientes.dat');

reset(archivo1);

begin

while not eof(archivo1) do

begin

read(archivo1,cliente);

with cliente do

begin

if (car) = filepos(archivo1) then

begin

control := 'a';

gotoxy(3,6);

textcolor (yellow);

writeln (nombre,' ',ap1,' ',ap2);

normvideo;

gotoxy(40,6);

writeln ('Fecha de Afiliaci¢n: ');

if month < 10 then

begin

gotoxy(61,6);

writeln ('[',day,'/0',month,'/',year,']');

Page 44: Program colegio

end

else

begin

gotoxy(61,6);

writeln ('[',day,'/',month,'/',year,']');

end;

gotoxy(3,8);

writeln ('Tel‚fono: ');

gotoxy(13,8);

writeln (tel);

gotoxy(3,10);

writeln ('Direcci¢n: ');

gotoxy(14,10);

writeln (dir,', ',city,', ',prov);

gotoxy(3,12);

textcolor (red);

writeln ('Pel¡culas pendientes:');

normvideo;

writeln;

assign(Archivo2,'mat.dad');

reset(archivo2);

textcolor (lightblue);

writeln (' C¢digo T¡tulo Fecha A.');

gotoxy(64,14);

textcolor (red);

writeln ('Fecha D.');

normvideo;

Page 45: Program colegio

writeln;

while not eof(archivo2) do

begin

read(archivo2,movie);

if movie.socio = filepos(archivo1) then

begin

if movie.month2 = 1 or 3 or 5 or 7 or 8 or 10 or 12 then

begin

day2p2 := movie.day2+2;

monthaux:= movie.month2;

if day2p2 > 31 then

begin

monthaux := month+1;

day2p2 := day2p2 - 31;

if monthaux > 12 then

begin

yearaux:= movie.year2+1;

monthaux := month-12;

end;

end;

end;

if movie.month2 = 4 or 6 or 9 or 11 then

begin

day2p2 := movie.day2+2;

monthaux:= movie.month2;

if day2p2 > 30 then

begin

Page 46: Program colegio

monthaux := month+1;

day2p2 := day2p2 - 30;

if monthaux > 12 then

begin

yearaux:= movie.year2+1;

monthaux := month-12;

end;

end;

end;

if movie.month2 = 2 then

begin

day2p2 := movie.day2+2;

monthaux:= movie.month2;

if (movie.year2 mod 4) = 0 then

if day2p2 > 29 then

begin

monthaux := month+1;

day2p2 := day2p2 - 29;

if monthaux > 12 then

begin

yearaux:= movie.year2+1;

monthaux := month-12;

end;

end

else

begin

day2p2 := movie.day2+2;

Page 47: Program colegio

monthaux:= movie.month2;

if day2p2 > 28 then

begin

monthaux := month+1;

day2p2 := day2p2 - 28;

if monthaux > 12 then

begin

yearaux:= movie.year2+1;

monthaux := month-12;

end;

end;

end;

end;

if monthaux < 10 then

begin

writeln(' ',filepos(archivo2),' '+

movie.titulo,movie.day2:21-

length(movie.titulo)+12,'/0',movie.month2,'/',movie.year2,+

' ',day2p2,'/0',monthaux,'/',yearaux);

end

else

begin

writeln(' ',filepos(archivo2),' '+

movie.titulo,movie.day2:21-

length(movie.titulo)+12,'/0',movie.month2,'/',movie.year2,+

' ',day2p2,'/',monthaux,'/',yearaux);

end;

end;

Page 48: Program colegio

end;

normvideo;

readkey;

end

end

end;

end;

until control= 'a';

end;

{***************************************************}

{*************************NOTAS DE ALUMNOS********************************}

Procedure notas;

begin

control:= 'b';

repeat

clrscr;

Page 49: Program colegio

begin

acu := 0;

WRITELN('DIGITE EL NOMBRE DEL ALUMNO: ');

READLN(al);

WRITE('MATEMATICAS: '); READLN(n1);

WRITE('BIOLOGIA: '); READLN(n2);

WRITE('HISTORIA: '); READLN(n3);

WRITE('CIVICA: '); READLN(n4);

WRITE('QUIMICA: '); READLN(n5);

WRITE('LENGUAJE: '); READLN(n6);

acu:=n1+n2+n3+n4+n5+n6;

prom:=acu/6;

WRITE('EL PROMEDIO DEL ALUMNO ES DE: '); WRITELN(prom:3:0);

READLN;

end;

until control= 'a';

end;

{*****************************************************}

{******************************PROCEDURE cons_materia************************}

procedure cons_materia;

begin

Page 50: Program colegio

control:= 'b';

repeat

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Materias :. ');

normvideo;

writeln;

writeln (' Digite C¢digo: [ ]');

gotoxy(19,3);

textcolor (lightblue);

readln (car);

normvideo;

assign(archivo2,'mat.dad');

reset(archivo2);

begin

while not eof(archivo2) do

begin

read(archivo2,movie);

with movie do

begin

if (car) = filepos(archivo2) then

begin

control := 'a';

gotoxy(3,6);

textcolor (white);

Page 51: Program colegio

writeln (titulo);

normvideo;

gotoxy(3,8);

writeln ('Nivel: [ ]');

case upcase(tipo) of

'A': begin

gotoxy(10,8);

textcolor(red);

writeln ('Primaria');

normvideo;

end;

'B': begin

gotoxy(10,8);

textcolor (lightblue);

writeln ('Intermedio');

normvideo;

end;

'C': begin

gotoxy(10,8);

textcolor (yellow);

writeln ('Secundaria');

normvideo;

end;

end;

gotoxy(3,10);

writeln ('Estado: ');

Page 52: Program colegio

if estado = 0 then

begin

gotoxy(11,10);

textcolor (lightblue);

writeln ('Disponible');

normvideo;

gotoxy(3,12);

writeln ('Desea asiganar materia (s/n) [ ]');

gotoxy(37,12);

opcion := readkey;

case upcase(opcion) of

'S' : begin

gotoxy(3,14);

writeln ('Digite # de Carnet del docente [ ]');

gotoxy(33,14);

readln (dow);

socio:= dow;

estado:= 1;

getdate(ano,mes,dia,dow);

year2 := ano;

month2 := mes;

day2 := dia;

gotoxy(3,18);

writeln ('Registro Actualizado!');

writeln;

writeln (' Presione cualquier tecla para continuar...');

Page 53: Program colegio

gotoxy(45,20);

readkey;

end;

end;

seek(archivo2,filepos(archivo2)-1);

write(archivo2,movie);

end

else

begin

gotoxy(11,10);

textcolor (red);

write ('Alquilada');

normvideo;

write (' por ');

assign(archivo1,'clientes.dat');

reset(Archivo1);

while not eof(Archivo1) do

begin

read(archivo1,cliente);

if socio = filepos(Archivo1) then

with cliente do

writeln (nombre,' ',ap1,' ',ap2);

end;

close(archivo1);

writeln;

if month2 < 10 then

Page 54: Program colegio

begin

writeln (' Fecha: ', day2,'/0',month2,'/',year2);

writeln;

textcolor (red);

writeln (' Fecha de Devoluci¢n: ');

normvideo;

gotoxy(24,14);

writeln (day2+2,'/0',month2,'/',year2);

gotoxy(3,16);

writeln ('Devolver pel¡cula (s/n) [ ]');

gotoxy(28,16);

opcion := readkey;

case upcase(opcion) of

'S' :begin

estado:= 0;

socio := 0;

seek(archivo2,filepos(Archivo2)-1);

write(Archivo2,movie);

gotoxy(3,18);

writeln ('Registro Actualizado!');

writeln;

writeln (' Presione cualquier tecla para continuar...');

gotoxy(45,20);

readkey;

end;

end;

Page 55: Program colegio

end

else

begin

writeln (' Fecha: ', day2,'/0',month2,'/',year2);

writeln;

textcolor (red);

writeln (' Fecha de Devoluci¢n: ');

normvideo;

gotoxy(24,14);

writeln (day2+2,'/',month2,'/',year2);

end;

end;

end;

end;

end;

end;

Page 56: Program colegio

close(Archivo2);

gotoxy(3,18);

writeln ('Digite cualquier tecla para continuar...');

gotoxy(25,18);

until control= 'a';

end;

{*****************************PROCEDURE PLUS_CINTA**************************}

procedure plus_cinta;

begin

with movie do

begin

repeat

assign(archivo2,'mat.dad');

reset(archivo2);

seek(archivo2,filesize(archivo2));

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Asignar Materia a docente :. ');

normvideo;

gotoxy(3,4);

writeln ('Materia: [ ]');

gotoxy(3,6);

writeln ('C¢digo : [ ] Sueldo: [½ ]');

Page 57: Program colegio

gotoxy(12,4);

readln (titulo);

gotoxy(13,6);

textcolor (yellow);

writeln (filepos(archivo2)+1);

normvideo;

gotoxy(35,6);

readln (price);

gotoxy(3,8);

writeln ('Tipo: A) Primaria [ ]');

gotoxy(9,9);

writeln ('B) Intermedio');

gotoxy(9,10);

writeln ('C) Secundaria');

textcolor (lightblue);

gotoxy(24,8);

readln (tipo);

estado := 0;

write(archivo2,movie);

close(archivo2);

textcolor (red);

gotoxy(3,12);

writeln ('Desea A¤adir materia (S/N) [ ]');

normvideo;

gotoxy(34,12);

readln (opcion);

untilupcase(opcion) = 'N';

Page 58: Program colegio

end;

end;

{********************************PROCEDURE

PRINT_INVENT**********************}

Procedure print_invent;

begin

assign(archivo2,'mat.dad');

reset(archivo2);

writeln (lst,' .: Inventario de Pel¡culas :.');

writeln

(lst,'**************************************************************************

***************');

writeln (lst,'C¢digo Materia Nivel Sueldo');

writeln

(lst,'**************************************************************************

***************');

while not eof(archivo2) do

begin

read(Archivo2,movie);

with movie do

begin

car:= filepos(archivo2);

write (lst,car:4,' ',titulo);

case upcase(tipo) of

'A' : writeln (lst,'Primaria':35-length(titulo)+15,' ½',price);

'B' : writeln (lst,'Intermedio':35-length(titulo)+14,' ½',price);

Page 59: Program colegio

'C' : writeln (lst,'Secundaria':35-length(titulo)+16,' ½',price);

end;

end

end;

end;

{*****************************PROCEDURE INVENTARIO**************************}

Procedure inventario;

begin

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Inventario de Materias :. ');

normvideo;

gotoxy(1,2);

textcolor (red);

textbackground (lightgray);

writeln (' C¢digo Materia Nivel Estado ');

normvideo;

assign(archivo2,'mat.dad');

reset(archivo2);

a:= 3;

while not eof(archivo2) do

begin

Page 60: Program colegio

read(archivo2,movie);

with movie do

begin

a:= a+1;

car:= filepos(archivo2);

gotoxy(2,a);

writeln (car);

gotoxy(12,a);

writeln (titulo);

case upcase(tipo) of

'A': begin

gotoxy(53,a);

textcolor(red);

writeln ('Primaria');

normvideo;

end;

'B': begin

gotoxy(53,a);

textcolor (lightblue);

writeln ('Intermedio');

normvideo;

end;

'C': begin

gotoxy(53,a);

textcolor (yellow);

writeln ('Secundaria');

normvideo;

Page 61: Program colegio

end;

end;

case estado of

0 : begin

gotoxy(69,a);

textcolor(lightblue);

writeln ('Asignada');

normvideo;

end;

1 : begin

gotoxy(69,a);

textcolor(Red);

writeln ('Libre');

normvideo;

end;

end;

end;

end;

gotoxy(2,a+2);

writeln ('Desea Imprimir el inventario (s/n) [ ]');

gotoxy(38,a+2);

readln (opcion);

if upcase(opcion) = 'S' then

print_invent;

Page 62: Program colegio

end;

{*************************PROCEDURE MODIFICAR CINTAS************************}

Procedure modificar_cinta;

begin

repeat

clrscr;

textcolor (white);

textbackground (blue);

writeln (' .: Modificar Asiganacion de Materia :. ');

normvideo;

gotoxy(3,4);

writeln ('Digite C¢digo: [ ]');

gotoxy(19,4);

textcolor (lightblue);

readln (car);

normvideo;

assign(archivo2,'mat.dad');

reset(archivo2);

begin

while not eof(archivo2) do

begin

read(archivo2,movie);

with movie do

Page 63: Program colegio

begin

if (car) = filepos(archivo2) then

begin

control := 'a';

gotoxy(3,6);

textcolor (white);

writeln (titulo);

normvideo;

gotoxy(3,8);

writeln ('Tipo: [ ]');

case upcase(tipo) of

'A': begin

gotoxy(10,8);

textcolor(red);

writeln ('A');

gotoxy(13,8);

writeln ('Primaria');

normvideo;

end;

'B': begin

gotoxy(10,8);

textcolor (lightblue);

writeln ('B');

gotoxy(13,8);

writeln ('Intermedio');

normvideo;

end;

Page 64: Program colegio

'C': begin

gotoxy(10,8);

textcolor (yellow);

writeln ('C');

gotoxy(13,8);

writeln ('Secundaria');

normvideo;

end;

end;

repeat

gotoxy(3,10);

writeln ('Sueldo: ½',price);

gotoxy(50,4);

textcolor (blue);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(50,5);

writeln ('º º');

gotoxy(50,6);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(50,7);

writeln ('º º');

gotoxy(50,8);

writeln ('º º');

gotoxy(50,9);

writeln ('º º');

gotoxy(50,10);

writeln ('º º');

Page 65: Program colegio

gotoxy(50,11);

writeln ('º º');

gotoxy(50,12);

writeln ('º º');

gotoxy(50,13);

writeln ('º º');

gotoxy(50,14);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

gotoxy(53,5);

textcolor (yellow);

writeln ('Selecionar Opci¢n');

normvideo;

gotoxy(52,7);

writeln ('A) Materia');

gotoxy(52,9);

writeln ('B) Nivel');

gotoxy(52,11);

writeln ('C) Sueldo');

gotoxy(52,13);

textcolor (red);

writeln ('D) Materias...');

normvideo;

gotoxy (70,14);

readln (opcion);

case upcase(opcion) of

'A': begin

Page 66: Program colegio

gotoxy(3,16);

writeln ('Nuev Materia: [ ]');

gotoxy(18,16);

Textcolor (lightblue);

readln (titulo);

normvideo;

seek(archivo2,filepos(Archivo2)-1);

write(archivo2,movie);

gotoxy(3,6);

writeln(' ');

gotoxy(3,16);

writeln (' ');

gotoxy(3,6);

textcolor (white);

writeln (titulo);

normvideo;

end;

'B': begin

gotoxy(3,16);

writeln ('Nuevo Nivel: A) Primaria [ ]');

gotoxy(15,17);

writeln ('B) Intermedio');

gotoxy(15,18);

writeln ('C) Secundaria');

textcolor (lightblue);

gotoxy(27,16);

readln (tipo);

Page 67: Program colegio

normvideo;

seek(archivo2,filepos(Archivo2)-1);

write(archivo2,movie);

gotoxy(3,16);

writeln (' ');

gotoxy(15,17);

writeln (' ');

gotoxy(15,18);

writeln (' ');

gotoxy(3,8);

writeln(' ');

gotoxy(3,8);

writeln ('Tipo: [ ]');

case upcase(tipo) of

'A': begin

gotoxy(10,8);

textcolor(red);

writeln ('A');

gotoxy(13,8);

writeln ('Primaria');

normvideo;

end;

'B': begin

gotoxy(10,8);

textcolor (lightblue);

writeln ('B');

gotoxy(13,8);

Page 68: Program colegio

writeln ('Intermedio');

normvideo;

end;

'C': begin

gotoxy(10,8);

textcolor (yellow);

writeln ('C');

gotoxy(13,8);

writeln ('Secundaria');

normvideo;

end;

end;

end;

'C' : begin

gotoxy(3,16);

writeln ('Nuevo Sueldo: [½ ]');

gotoxy(19,16);

Textcolor (lightblue);

readln (price);

normvideo;

seek(archivo2,filepos(Archivo2)-1);

write(archivo2,movie);

gotoxy(3,10);

writeln(' ');

gotoxy(3,16);

writeln (' ');

normvideo;

Page 69: Program colegio

end;

end;

until upcase(opcion) = 'D'

end;

end;

end;

close(archivo2);

end;

until control = 'a';

end;

{*****************************PROCEDURE CINTAS******************************}

procedure cintas;

begin

repeat

clrscr;

textcolor (red);

Page 70: Program colegio

gotoxy(25,6);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(25,7);

writeln ('º º');

gotoxy(25,8);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(25,9);

writeln ('º º');

gotoxy(25,10);

writeln ('º º');

gotoxy(25,11);

writeln ('º º');

gotoxy(25,12);

writeln ('º º');

gotoxy(25,13);

writeln ('º º');

gotoxy(25,14);

writeln ('º º');

gotoxy(25,15);

writeln ('º º');

gotoxy(25,16);

writeln ('º º');

gotoxy(25,17);

writeln ('º º');

gotoxy(25,18);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

Page 71: Program colegio

gotoxy(28,7);

textcolor (yellow);

writeln ('Seleccionar Opci¢n');

normvideo;

gotoxy(28,9);

writeln ('A) A¤adir ');

gotoxy(28,11);

writeln ('B) Inventario ');

gotoxy(28,13);

writeln ('C) Modificar');

gotoxy(28,15);

writeln ('D) Consultar');

gotoxy(28,17);

textcolor (yellow);

writeln ('E) Principal...');

normvideo;

gotoxy(45,18);

readln (opcion);

case upcase(opcion) of

'A' :plus_cinta;

'B' : inventario;

'C' :modificar_cinta;

'D' :cons_materia;

end;

until upcase (opcion) = 'E';

Page 72: Program colegio

opcion := 'Z';

end;

{****************************PROCEDURE OPCIONES*****************************}

Procedure opciones;

begin

repeat

textcolor (lightgray);

clrscr;

gotoxy(25,4);

textcolor (blue);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(25,5);

writeln ('º º');

gotoxy(25,6);

writeln ('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');

gotoxy(25,7);

writeln ('º º');

gotoxy(25,8);

writeln ('º º');

gotoxy(25,9);

writeln ('º º');

gotoxy(25,10);

writeln ('º º');

gotoxy(25,11);

Page 73: Program colegio

writeln ('º º');

gotoxy(25,12);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');

normvideo;

gotoxy(30,5);

textcolor (lightblue);

writeln ('Limpiar Archivo');

normvideo;

gotoxy(27,7);

writeln ('A) Clientes.dat');

gotoxy(27,9);

writeln ('B) mat.dad');

gotoxy(27,11);

textcolor (yellow);

writeln ('C) Principal...');

normvideo;

gotoxy (45,12);

readln (opcion);

case upcase(opcion) of

'A': begin

assign(archivo1,'clientes.dat');

rewrite(archivo1);

clrscr;

gotoxy(28,5);

textcolor (lightblue);

writeln (' Limpiando Archivo...');

normvideo;

Page 74: Program colegio

gotoxy(28,6);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(28,7);

writeln ('º º');

gotoxy(28,8);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ %]ͼ');

a := 29;

b := 0;

repeat

gotoxy(a,7);

textbackground (blue);

write(' ');

delay(25);

normvideo;

a := a+1;

gotoxy(44,8);

write(b/20*100:0:0);

b := b+1;

until b = 21;

gotoxy(35,10);

textcolor (red);

writeln ('Salir...');

normvideo;

gotoxy(43,10);

readkey;

end;

Page 75: Program colegio

'B': begin

assign(archivo2,'mat.dad');

rewrite(archivo2);

clrscr;

gotoxy(28,5);

textcolor (lightblue);

writeln (' Limpiando Archivo...');

normvideo;

gotoxy(28,6);

writeln ('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');

gotoxy(28,7);

writeln ('º º');

gotoxy(28,8);

writeln ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ %]ͼ');

a := 29;

b := 0;

repeat

gotoxy(a,7);

textbackground (blue);

write(' ');

delay(25);

normvideo;

a := a+1;

gotoxy(44,8);

write(b/20*100:0:0);

b := b+1;

until b = 21;

Page 76: Program colegio

gotoxy(35,10);

textcolor (red);

writeln ('Salir...');

normvideo;

gotoxy(43,10);

readkey;

end;

end;

until upcase(opcion) = 'C'

end;

{*************************************************************************}

{************************************INICIO*********************************}

BEGIN

repeat

normvideo;

clrscr;

cuadro;

gotoxy(28,7);

textcolor (lightblue);

writeln ('Seleccionar Opci¢n');

normvideo;

gotoxy(28,9);

writeln ('A) Docentes');

Page 77: Program colegio

gotoxy(28,11);

writeln ('B) Alumnos');

gotoxy(28,13);

writeln ('C) Materia');

gotoxy(28,15);

writeln ('D) Opciones');

gotoxy(28,17);

writeln ('E) Comparar');

gotoxy(28,19);

writeln ('F) Notas');

gotoxy(28,21);

textcolor (lightblue);

writeln ('G) Salir...');

normvideo;

gotoxy(45,18);

readln (opcion);

case upcase(opcion) of

'A': Socios;

'B': estudiantes;

'C': cintas;

'D': opciones;

'E': comparar;

'F': notas;

end

until upcase (opcion) = 'G';

END.