SlideShare una empresa de Scribd logo
1 de 77
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;
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;
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 ('º                     º');
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*************************}
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;
{***************************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
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);
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);
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);
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: ');
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);
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 ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');
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);
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);
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);
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: [                   ]');
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);
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;
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
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
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;
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 ('º                    º');
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;
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);
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);
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 ('º                    º');
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****************************}
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
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: ');
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);
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);
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);
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
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
'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: [          ]');
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);
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 :.');
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);
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;
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 ('º                    º');
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);
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;
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,']');
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;
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
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;
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;
end;

                  normvideo;

                  readkey;



               end



           end




           end;




       end;

       until control= 'a';

end;



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

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



Procedure notas;

begin

   control:= 'b';

  repeat



   clrscr;
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
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);
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: ');
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...');
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
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;
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;
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: [½ ]');
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';
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);
'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
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;
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;
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
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;
'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 ('º                    º');
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
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);
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);
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;
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);
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;
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';
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);
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;
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;
'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;
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');
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.

Más contenido relacionado

Similar a Program colegio

Similar a Program colegio (6)

MATRIZ MÉTODO GAUSS JORDAN
MATRIZ MÉTODO GAUSS JORDANMATRIZ MÉTODO GAUSS JORDAN
MATRIZ MÉTODO GAUSS JORDAN
 
Programación Calculadora C++
Programación Calculadora C++ Programación Calculadora C++
Programación Calculadora C++
 
Programación de la calculadora2
Programación de la calculadora2Programación de la calculadora2
Programación de la calculadora2
 
ARCHIVOS
ARCHIVOSARCHIVOS
ARCHIVOS
 
Programa 14
Programa 14Programa 14
Programa 14
 
Programacion en pascal
Programacion en pascalProgramacion en pascal
Programacion en pascal
 

Más de Isidro Torrez Jorge (8)

Proyecto programacion 2.
Proyecto programacion 2.Proyecto programacion 2.
Proyecto programacion 2.
 
Presentación vector
Presentación vectorPresentación vector
Presentación vector
 
Presentación vector
Presentación vectorPresentación vector
Presentación vector
 
Presentación vector
Presentación vectorPresentación vector
Presentación vector
 
Presentación de matrices
Presentación de matricesPresentación de matrices
Presentación de matrices
 
Presentación de matrices
Presentación de matricesPresentación de matrices
Presentación de matrices
 
Presentación de matrices
Presentación de matricesPresentación de matrices
Presentación de matrices
 
Tu estas aqui
Tu estas aquiTu estas aqui
Tu estas aqui
 

Último

CALENDARIZACION DE MAYO / RESPONSABILIDAD
CALENDARIZACION DE MAYO / RESPONSABILIDADCALENDARIZACION DE MAYO / RESPONSABILIDAD
CALENDARIZACION DE MAYO / RESPONSABILIDADauxsoporte
 
plande accion dl aula de innovación pedagogica 2024.pdf
plande accion dl aula de innovación pedagogica 2024.pdfplande accion dl aula de innovación pedagogica 2024.pdf
plande accion dl aula de innovación pedagogica 2024.pdfenelcielosiempre
 
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdf
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdfSELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdf
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdfAngélica Soledad Vega Ramírez
 
Criterios ESG: fundamentos, aplicaciones y beneficios
Criterios ESG: fundamentos, aplicaciones y beneficiosCriterios ESG: fundamentos, aplicaciones y beneficios
Criterios ESG: fundamentos, aplicaciones y beneficiosJonathanCovena1
 
LABERINTOS DE DISCIPLINAS DEL PENTATLÓN OLÍMPICO MODERNO. Por JAVIER SOLIS NO...
LABERINTOS DE DISCIPLINAS DEL PENTATLÓN OLÍMPICO MODERNO. Por JAVIER SOLIS NO...LABERINTOS DE DISCIPLINAS DEL PENTATLÓN OLÍMPICO MODERNO. Por JAVIER SOLIS NO...
LABERINTOS DE DISCIPLINAS DEL PENTATLÓN OLÍMPICO MODERNO. Por JAVIER SOLIS NO...JAVIER SOLIS NOYOLA
 
Imperialismo informal en Europa y el imperio
Imperialismo informal en Europa y el imperioImperialismo informal en Europa y el imperio
Imperialismo informal en Europa y el imperiomiralbaipiales2016
 
Cuaderno de trabajo Matemática 3 tercer grado.pdf
Cuaderno de trabajo Matemática 3 tercer grado.pdfCuaderno de trabajo Matemática 3 tercer grado.pdf
Cuaderno de trabajo Matemática 3 tercer grado.pdfNancyLoaa
 
origen y desarrollo del ensayo literario
origen y desarrollo del ensayo literarioorigen y desarrollo del ensayo literario
origen y desarrollo del ensayo literarioELIASAURELIOCHAVEZCA1
 
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICA
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICABIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICA
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICAÁngel Encinas
 
GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdf
GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdfGUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdf
GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdfPaolaRopero2
 
Programacion Anual Matemática5 MPG 2024 Ccesa007.pdf
Programacion Anual Matemática5    MPG 2024  Ccesa007.pdfProgramacion Anual Matemática5    MPG 2024  Ccesa007.pdf
Programacion Anual Matemática5 MPG 2024 Ccesa007.pdfDemetrio Ccesa Rayme
 
Programacion Anual Matemática4 MPG 2024 Ccesa007.pdf
Programacion Anual Matemática4    MPG 2024  Ccesa007.pdfProgramacion Anual Matemática4    MPG 2024  Ccesa007.pdf
Programacion Anual Matemática4 MPG 2024 Ccesa007.pdfDemetrio Ccesa Rayme
 
INSTRUCCION PREPARATORIA DE TIRO .pptx
INSTRUCCION PREPARATORIA DE TIRO   .pptxINSTRUCCION PREPARATORIA DE TIRO   .pptx
INSTRUCCION PREPARATORIA DE TIRO .pptxdeimerhdz21
 
Registro Auxiliar - Primaria 2024 (1).pptx
Registro Auxiliar - Primaria  2024 (1).pptxRegistro Auxiliar - Primaria  2024 (1).pptx
Registro Auxiliar - Primaria 2024 (1).pptxFelicitasAsuncionDia
 
MAYO 1 PROYECTO día de la madre el amor más grande
MAYO 1 PROYECTO día de la madre el amor más grandeMAYO 1 PROYECTO día de la madre el amor más grande
MAYO 1 PROYECTO día de la madre el amor más grandeMarjorie Burga
 
Sesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docxSesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docxMaritzaRetamozoVera
 
Qué es la Inteligencia artificial generativa
Qué es la Inteligencia artificial generativaQué es la Inteligencia artificial generativa
Qué es la Inteligencia artificial generativaDecaunlz
 

Último (20)

CALENDARIZACION DE MAYO / RESPONSABILIDAD
CALENDARIZACION DE MAYO / RESPONSABILIDADCALENDARIZACION DE MAYO / RESPONSABILIDAD
CALENDARIZACION DE MAYO / RESPONSABILIDAD
 
plande accion dl aula de innovación pedagogica 2024.pdf
plande accion dl aula de innovación pedagogica 2024.pdfplande accion dl aula de innovación pedagogica 2024.pdf
plande accion dl aula de innovación pedagogica 2024.pdf
 
Power Point: Fe contra todo pronóstico.pptx
Power Point: Fe contra todo pronóstico.pptxPower Point: Fe contra todo pronóstico.pptx
Power Point: Fe contra todo pronóstico.pptx
 
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdf
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdfSELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdf
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdf
 
Criterios ESG: fundamentos, aplicaciones y beneficios
Criterios ESG: fundamentos, aplicaciones y beneficiosCriterios ESG: fundamentos, aplicaciones y beneficios
Criterios ESG: fundamentos, aplicaciones y beneficios
 
LABERINTOS DE DISCIPLINAS DEL PENTATLÓN OLÍMPICO MODERNO. Por JAVIER SOLIS NO...
LABERINTOS DE DISCIPLINAS DEL PENTATLÓN OLÍMPICO MODERNO. Por JAVIER SOLIS NO...LABERINTOS DE DISCIPLINAS DEL PENTATLÓN OLÍMPICO MODERNO. Por JAVIER SOLIS NO...
LABERINTOS DE DISCIPLINAS DEL PENTATLÓN OLÍMPICO MODERNO. Por JAVIER SOLIS NO...
 
Imperialismo informal en Europa y el imperio
Imperialismo informal en Europa y el imperioImperialismo informal en Europa y el imperio
Imperialismo informal en Europa y el imperio
 
Cuaderno de trabajo Matemática 3 tercer grado.pdf
Cuaderno de trabajo Matemática 3 tercer grado.pdfCuaderno de trabajo Matemática 3 tercer grado.pdf
Cuaderno de trabajo Matemática 3 tercer grado.pdf
 
origen y desarrollo del ensayo literario
origen y desarrollo del ensayo literarioorigen y desarrollo del ensayo literario
origen y desarrollo del ensayo literario
 
Presentacion Metodología de Enseñanza Multigrado
Presentacion Metodología de Enseñanza MultigradoPresentacion Metodología de Enseñanza Multigrado
Presentacion Metodología de Enseñanza Multigrado
 
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICA
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICABIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICA
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICA
 
GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdf
GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdfGUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdf
GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdf
 
Programacion Anual Matemática5 MPG 2024 Ccesa007.pdf
Programacion Anual Matemática5    MPG 2024  Ccesa007.pdfProgramacion Anual Matemática5    MPG 2024  Ccesa007.pdf
Programacion Anual Matemática5 MPG 2024 Ccesa007.pdf
 
Programacion Anual Matemática4 MPG 2024 Ccesa007.pdf
Programacion Anual Matemática4    MPG 2024  Ccesa007.pdfProgramacion Anual Matemática4    MPG 2024  Ccesa007.pdf
Programacion Anual Matemática4 MPG 2024 Ccesa007.pdf
 
INSTRUCCION PREPARATORIA DE TIRO .pptx
INSTRUCCION PREPARATORIA DE TIRO   .pptxINSTRUCCION PREPARATORIA DE TIRO   .pptx
INSTRUCCION PREPARATORIA DE TIRO .pptx
 
Registro Auxiliar - Primaria 2024 (1).pptx
Registro Auxiliar - Primaria  2024 (1).pptxRegistro Auxiliar - Primaria  2024 (1).pptx
Registro Auxiliar - Primaria 2024 (1).pptx
 
Fe contra todo pronóstico. La fe es confianza.
Fe contra todo pronóstico. La fe es confianza.Fe contra todo pronóstico. La fe es confianza.
Fe contra todo pronóstico. La fe es confianza.
 
MAYO 1 PROYECTO día de la madre el amor más grande
MAYO 1 PROYECTO día de la madre el amor más grandeMAYO 1 PROYECTO día de la madre el amor más grande
MAYO 1 PROYECTO día de la madre el amor más grande
 
Sesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docxSesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docx
 
Qué es la Inteligencia artificial generativa
Qué es la Inteligencia artificial generativaQué es la Inteligencia artificial generativa
Qué es la Inteligencia artificial generativa
 

Program colegio

  • 1. 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;
  • 2. 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;
  • 3. 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 ('º º');
  • 4. 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*************************}
  • 5. 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;
  • 6. {***************************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
  • 7. 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);
  • 8. 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);
  • 9. 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);
  • 10. 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: ');
  • 11. 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);
  • 12. 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 ('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ ]ͼ');
  • 13. 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);
  • 14. 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);
  • 15. 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);
  • 16. 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: [ ]');
  • 17. 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);
  • 18. 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;
  • 19. 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
  • 20. 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
  • 21. 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;
  • 22. 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 ('º º');
  • 23. 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;
  • 24. 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);
  • 25. 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);
  • 26. 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 ('º º');
  • 27. 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****************************}
  • 28. 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
  • 29. 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: ');
  • 30. 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);
  • 31. 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);
  • 32. 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);
  • 33. 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
  • 34. 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
  • 35. '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: [ ]');
  • 36. 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);
  • 37. 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 :.');
  • 38. 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);
  • 39. 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;
  • 40. 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 ('º º');
  • 41. 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);
  • 42. 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;
  • 43. 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,']');
  • 44. 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;
  • 45. 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
  • 46. 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;
  • 47. 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;
  • 48. end; normvideo; readkey; end end end; end; until control= 'a'; end; {***************************************************} {*************************NOTAS DE ALUMNOS********************************} Procedure notas; begin control:= 'b'; repeat clrscr;
  • 49. 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
  • 50. 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);
  • 51. 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: ');
  • 52. 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...');
  • 53. 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
  • 54. 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;
  • 55. 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;
  • 56. 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: [½ ]');
  • 57. 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';
  • 58. 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);
  • 59. '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
  • 60. 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;
  • 61. 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;
  • 62. 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
  • 63. 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;
  • 64. '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 ('º º');
  • 65. 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
  • 66. 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);
  • 67. 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);
  • 68. 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;
  • 69. 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);
  • 70. 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;
  • 71. 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';
  • 72. 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);
  • 73. 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;
  • 74. 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;
  • 75. '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;
  • 76. 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');
  • 77. 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.