Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  ExamenAngel
Language: PASCAL
Code:
Program Trabfinal;
Uses
     Crt;
Const
     sg=100;
     sj=75;
     sc=50;
Var
     nom,lecat:string;
     x,y,r,s,perro,gato,ne,g,j,c,hs:integer;
     oe,cat:char;
     salnet,sal:real;
     t:byte;
Begin
     Repeat
          Textbackground(5);
          Clrscr;
          Writeln('Menu');
          Writeln('1)Pago de proveedores');
          Writeln('2)Series de numero y colores');
          Writeln('3)Tablas de multiplicar');
          Writeln('4)Salir');
          Readln(x);
          Case x of
          2:Begin
               Repeat
                    Textbackground(5);
                    Clrscr;
                    Writeln('Escalera');
                    Writeln('1)Sin Colores');
                    Writeln('2)Colores en Vertical');
                    Writeln('3)Colores en Horizontal');
                    Writeln('4)Regresar al Menu anterior');
                    Readln(y);
                    If y=3 then
                    Begin
                         Textbackground(0);
                         Clrscr;     
                         For perro:=1 to 15 do
                         Begin
                              For gato:=1 to perro do
                              Begin
                                   Textcolor(perro);
                                   Write(gato,' ');
                              End;
                              writeln;
                         End;
                    End;
                    If y=2 then
                    Begin
                         Textbackground(0);
                         Clrscr;     
                         For perro:=1 to 15 do
                         Begin
                              For gato:=1 to perro do
                              Begin
                                   Textcolor(gato);
                                   Write(gato,' ');
                              End;
                              writeln;
                         End;
                    End;
                    If y=1 then
                    Begin
                         Textbackground(0);
                         Clrscr;     
                         For perro:=1 to 15 do
                         Begin
                              For gato:=1 to perro do
                              Begin
                                   Write(gato,' ');
                              End;
                              writeln;
                         End;
                    End;
               Readln;                                                                                                                             
               Until y=4;
            End;
          1:Begin
               ne:=0;
               oe:='s';
               Salnet:=0;
               g:=0;
               j:=0;
               c:=0;
               While (oe='s') or (oe='S') do
               Begin
                    Textbackground(5);
                    Clrscr;
                    Writeln('Pago de Facturas a Proveedores');
                    Writeln('Ingresa Nombre de Proveedor:');
                    Readln(nom);
                    Writeln('Ingresa la cantidad de productos por pagar:');
                    Readln(hs);
                    Writeln('--------------------------------------------------------------------------');
                    Writeln('a) Rollos' );
                    Writeln('b) Camaras');
                    Writeln('c) Pilas');
                    Writeln('Selecciona el tipo de producto: a, b o c');
                    Readln(cat);
                    Case cat of
                    'a':Begin
                         sal:=hs*sg;
                         g:=g+1;
                         lecat:='rollos';
                        End;
                    'b':Begin
                         sal:=hs*sj;
                         J:=J+1;
                         lecat:='camaras';
                        End;
                    'c':Begin
                         sal:=hs*sc;
                         c:=c+1;
                         lecat:='pilas';
                         End;
                    End;
                    Salnet:=Salnet+sal;
                    ne:=ne+1;
                    Writeln('El proveedor ',nom,' con el producto de  ', lecat,', recibe el pago por ',hs,' productos de: $',sal:3:2);
                    Writeln('Otros proveedores? s/n');
                    readln(oe);
               End;
               Writeln('Pago Total a proveedores es de:');
               Writeln('$',SalNet:7:2);
               Writeln('Numero de proveedores:  ',ne);
               Writeln('Numero de proveedores de Rollos:  ',g);
               Writeln('Numero de proveedores de Camaras:  ',j);
               Writeln('Numero de proveedores de Pilas:  ',c);
               Readln;                    
            End;
          3:Begin
               Writeln('Aqui puedes ver las tablas de multiplicar');

               Writeln('Presiona un numero para ver su tabla:');

               Readln(r);
               For s:=1 to 10 do

                    Begin

                         Write(r,'x',s,'=');

                         Writeln(r*s);

                    End;
               Writeln('Presiona cualquier numero y despues enter para continuar');
               readln(t);
          End;
     End;
     Until X=4;
End.

          
          
          
Comments: