program integrador;
uses
crt;
var
opc:char;
msg:string='programa creado por el doner martin';
procedure centrar(texto:string;
fila:integer);
var
columna:integer;
begin
columna:=(80-length(texto)) DIV 2;
gotoxy(columna,fila);
write(texto);
end;
procedure
salida;
begin
clrscr;
textbackground(red);
textcolor(yellow);
centrar('programa para el calculo de areas
se despide,BYE',8);
Delay(2000);
end;
procedure aritmeticas;
procedure multiplicacion;
var
x,y,z:integer;
begin
clrscr;
centrar('dame un numero' , 5);
readln(x);
centrar('dame otro numero' , 6);
readln(y);
z:=x*y;
centrar('la multiplicacion de esos numeros
es igual a:',8);
writeln(z);
writeln;
writeln;
writeln;
centrar('preciona una tecla para regresar
al menu',10);
readkey;
end;
procedure
resta;
var
x,y,z:integer;
begin
clrscr;
centrar('dame un numero' , 5);
readln(x);
centrar('dame otro numero' , 6);
readln(y);
z:=x-y;
centrar('la suma de esos numeros es igual
a: ', 8);
writeln(z);
writeln;
writeln;
writeln;
centrar('preciona una tecla para regresar
al menu',10);
readkey;
end;
procedure
suma;
var
x,y,z:integer;
begin
clrscr;
centrar('dame un numero' , 5);
readln(x);
centrar('dame otro numero', 6);
readln(y);
z:=x+y;
centrar('la suma de esos numeros es igual
a:',8);
writeln(z);
writeln;
writeln;
writeln;
centrar('preciona una tecla para regresar
al menu',10);
readkey;
end;
begin
repeat;
clrscr;
gotoxy(18,1);
writeln('+----------------------------------------------+');
gotoxy(18,2);
writeln('I I');
gotoxy(18,3);
writeln('+----------------------------------------------+');
gotoxy(23,2);
textcolor(yellow);
textbackground(black);
writeln(msg);
textcolor(white);
textbackground(black);
gotoxy(16,5);
writeln('+----------------------------------------------+');
gotoxy(16,6);
writeln('I
I');
gotoxy(16,7);
writeln('I
I');
gotoxy(16,8);
writeln('I I');
gotoxy(16,9);
writeln('I
I');
gotoxy(16,10);
writeln('I
I');
gotoxy(16,11);
writeln('I
I');
gotoxy(16,12);
writeln('I
I');
gotoxy(16,13);
writeln('I
I');
gotoxy(16,14);
writeln('I
I');
gotoxy(16,15);
writeln('I I');
gotoxy(16,16);
writeln('I
I');
gotoxy(16,17);
writeln('+----------------------------------------------+');
centrar('opciones del programa',6);
centrar('[S]uma de dos numeros',8);
centrar('[R]esta de dos numeros',10);
centrar('[M]ultiplicar de dos numeros',12);
centrar('[Y]regresar al menu
principal',14);
textcolor(green);
centrar('elige una opcion',15);
opc:=readkey;
case opc of
'S','s': suma;
'R','r': resta;
'M','m': multiplicacion;
end;
until
(opc='Y') or (opc='y');
end;
procedure
ciclos;
Procedure Numeracion1;
Var
x:integer;
Begin
Clrscr;
For x:=1 to 100 do
Begin
Write('
',x);
End;
Readkey;
End;
Procedure
Numeracion2;
Var
x:integer;
Begin
Clrscr;
For x:=100 downto 1 do
Begin
Write('
',x);
End;
Readkey;
End;
Procedure
Numeracion3;
Var
x,y:integer;
Begin
Clrscr;
For x:=1 to 100 do
Begin
Write('
',x);
y:=y+2;
End;
Readkey;
End;
Procedure Numeracion4;
Var
x,y:integer;
Begin
Clrscr;
y:=1;
For x:=1 to 100 do
Begin
Write('
',x);
y:=y+2;
End;
Readkey;
End;
Begin
Repeat
Clrscr;
Gotoxy(24,1);
Writeln('+---------------------------------------------------+');
Gotoxy(24,2);
Writeln('|
|');
Gotoxy(24,3);
Writeln('+---------------------------------------------------+');
Gotoxy(28,2);
Textcolor(yellow);
textbackground(red);
Writeln(msg);
Textcolor(white);
Textbackground(black);
Gotoxy(8,5);
Writeln('+---------------------------------------------------+');
Gotoxy(8,6);
Writeln('|
|');
Gotoxy(8,7);
Writeln('|
|');
Gotoxy(8,8);
Writeln('|
|');
Gotoxy(8,9);
Writeln('| |');
Gotoxy(8,10);
Writeln('|
|');
Gotoxy(8,11);
Writeln('|
|');
Gotoxy(8,12);
Writeln('| |');
Gotoxy(8,13);
Writeln('|
|');
Gotoxy(8,14);
Writeln('|
|');
Gotoxy(8,15);
Writeln('| |');
Gotoxy(8,16);
Writeln('|
|');
Gotoxy(8,17);
Writeln('|
|');
Gotoxy(8,18);
Writeln('+---------------------------------------------------+');
Centrar('OPCIONES DEL PROGRAMA',6);
Centrar('[N]umeracion de menor a mayor',8);
Centrar('N[u]meracion de mayor a
menor',10);
Centrar('Nu[M]eracion de dos en dos',12);
Centrar('Num[E]racion de tres en tres',14);
Centrar('[Y] regresar al menu
principal',16);
Textcolor(green);
Centrar('Elige una opcion',17);
Opc:=readkey;
Case opc of
'N','n': Numeracion1;
'U','u': Numeracion2;
'M','m': Numeracion3;
'E','e': Numeracion4;
End;
Until (opc='Y') or (opc='y');
End;
procedure
circulo;
var
area,r:real;
begin
clrscr;
centrar('escribir el valor de r(radio)',5);
readln(r);
area:=PI*r*r;
centrar('el area del circulo es igual
a',8);
writeln(area:4:2);
writeln;
writeln;
writeln;
centrar('presiona una para regresar al
menu',10);
readkey;
end;
procedure
triangulo;
var
area,base,altura:real;
begin
clrscr;
centrar('escribe el valor de b(base)',5);
readln(base);
centrar('escribe el valor de h(altura)',7);
readln(altura);
area:=((base*altura)/2);
centrar('el area del triangulo es igual
a',9);
writeln(area:4:2);
writeln;
writeln;
writeln;
centrar('presiona una tecla para regresar
al menu',10);
readkey;
end;
procedure
rectangulo;
var
area,base,altura:real;
begin
clrscr;
centrar('escribe el valor de b(base)',5);
readln(base);
centrar('escribe el valor de h(altura)',7);
readln(altura);
area:=(base*altura);
centrar('el area del rectangulo es igual
a',9);
writeln;
writeln;
writeln;
centrar('presiona una tecla para regresar
al menu',10);
readkey;
end;
Procedure
Cuadrado;
Var
area,Lado:real;
Begin
Clrscr;
Centrar('Escribe el valor del Lado: ',5);
Read(Lado);
area:=Lado*Lado;
Centrar('El area del Cuadrado es igual a:
',7);
Writeln(area:4:2);
Writeln;
Writeln;
Writeln;
Centrar('Presiona ENTER para regresar al
menu principal',10);
Readkey;
End;
Procedure Romboide;
Var
base,altura,area:real;
Begin
Clrscr;
Centrar('Escribe el valor de la base: ',3);
Read(base);
Centrar('Escribe el valor de la altura:
',5);
Read(altura);
area:=base*altura;
Centrar('El area del Romboide es igual a:
',8);
Writeln(area:4:2);
Writeln;
Writeln;
Writeln;
Centrar('Presiona ENTER para regresar al
menu principal',10);
Readkey;
End;
Procedure
Rombo;
Var
area, Diagonalmayor,diagonalmenor :real;
Begin
Clrscr;
Centrar('Escribe el valor de la Diagonal
mayor: ',5);
Read(Diagonalmayor);
Centrar('Escribe el valor de la diagonal
menor: ',6);
Read(diagonalmenor);
area:=Diagonalmayor*diagonalmenor/2;
Centrar('El area del Rombo es igual a:
',8);
Writeln(area:4:2);
Writeln;
Writeln;
Writeln;
Centrar('Presiona ENTER para regresar al
menu principal',10);
Readkey;
End;
Procedure
Trapecio;
Var
area, Basemayor,basemenor,altura :real;
Begin
Clrscr;
Centrar('Escribe el valor de la Base mayor:
',5);
Read(Basemayor);
Centrar('Escribe el valor de la base menor:
',6);
Read(basemenor);
area:=Basemayor*basemenor/2;
Centrar('El area del Trapecio es igual a:
',8);
Writeln(area:4:2);
Writeln;
Writeln;
Writeln;
Centrar('Presiona ENTER para regresar al
menu principal',10);
Readkey;
End;
Procedure Pentagono;
Var
area, Perimetro,apotema :real;
Begin
Clrscr;
Centrar('Escribe el valor del Perimetro:
',5);
Read(Perimetro);
Centrar('Escribe el valor de la apotema:
',6);
Read(apotema);
area:=Perimetro*apotema/2;
Centrar('El area del Pentagono es igual a:
',8);
Writeln(area:4:2);
Writeln;
Writeln;
Writeln;
Centrar('Presiona ENTER para regresar al
menu principal ',10);
Readkey;
End;
procedure
areas;
begin
Repeat
Clrscr;
Gotoxy(15,1);
Writeln('+--------------------------------------------+');
Gotoxy(15,2);
Writeln('|
|');
Gotoxy(15,3);
Writeln('+--------------------------------------------+');
Gotoxy(20,2);
textcolor(yellow);
textbackground(red);
Writeln(msg);
textcolor(brown);
textbackground(black);
Gotoxy(12,5);
Writeln('+------------------------------------------------+');
Gotoxy(12,6);
Writeln('|
|');
Gotoxy(12,7);
Writeln('|
|');
Gotoxy(12,8);
Writeln('| |');
Gotoxy(12,9);
Writeln('|
|');
Gotoxy(12,10);
Writeln('|
|');
Gotoxy(12,11);
Writeln('| |');
Gotoxy(12,12);
Writeln('|
|');
Gotoxy(12,13);
Writeln('|
|');
Gotoxy(12,14);
Writeln('|
|');
Gotoxy(12,15);
Writeln('|
|');
Gotoxy(12,16);
Writeln('|
|');
Gotoxy(12,17);
Writeln('+------------------------------------------------+');
Centrar('opciones de programa',6);
Centrar('[C]irculo',7);
Centrar('[T]riangulo',8);
Centrar('[R]ectagulo',9);
Centrar('C[U]adrado',10);
Centrar('R[O]mboide',11);
Centrar('Tr[A]pecio',12);
Centrar('[P]entagono',13);
Centrar('Ro[M]bo',14);
Centrar('[Y]regresa al menu principal',15);
Textcolor(blue);
Centrar('Elige una opcion ',18);
opc:=readkey;
Case opc of
'C','c':circulo;
'T','t':triangulo;
'R','r':rectangulo;
'U','u':cuadrado;
'O','o':romboide;
'A','a':trapecio;
'P','p':pentagono;
'M','m':rombo;
End;
Until (opc='Y') or (opc='y');
End;
begin
repeat
clrscr;
textcolor(green);
centrar('Programa integrador tercer
parcial',6);
centrar('elaborado por: Martin Martinez',7);
centrar('bachillerato 30',8);
centrar('QUINTO A,',9);
centrar('Programacion 1',10);
textcolor(yellow);
centrar('presiona ENTER para
continuar',14);
textcolor(white);
readkey;
clrscr;
gotoxy(18,1);
writeln('+-------------------------------------------+');
gotoxy(18,2);
writeln('I I');
gotoxy(18,1);
writeln('+-------------------------------------------+');
GOTOXY(23,2);
textcolor(yellow);
textbackground(black);
writeln(msg);
textcolor(white);
textbackground(black);
gotoxy(16,5);
writeln('+--------------------------------------------+');
gotoxy(16,6);
writeln('I
I');
gotoxy(16,7);
writeln('I
I');
gotoxy(16,8);
writeln('I
I');
gotoxy(16,9);
writeln('I I');
gotoxy(16,10);
writeln('I
I');
gotoxy(16,11);
writeln('I
I');
gotoxy(16,12);
writeln('I
I');
gotoxy(16,13);
writeln('I
I');
gotoxy(16,14);
writeln('I
I');
gotoxy(16,15);
writeln('I
I');
gotoxy(16,16);
writeln('I I');
gotoxy(16,17);
writeln('I
I');
gotoxy(16,18);
writeln('I
I');
gotoxy(16,19);
writeln('+--------------------------------------------+');
centrar('Opciones del programa',6);
centrar('[O]peraciones aritmeticas',8);
centrar('[C]alculo de areas',9);
centrar('C[i]clos',10);
centrar('[X]Salir del programa',17);
textcolor(green);
centrar('elige una opcion',20);
opc:=readkey;
case opc of
'O','o': aritmeticas;
'C','c': areas;
'I','i': ciclos;
'X','x': salida;
end;
until(opc='X')
or(opc='x');
end.








.png)
.png)
