You are on page 1of 21

UNIVERSIDAD MAYOR DE SAN SIMON

FACULTAD DE CIENCIAS Y TECNOLOGIA


INGENIERIA CIVIL

NOMBRES: LUZETH PAOLA FLORES ACUÑA

MATERIA: COMPUTACION PARA INGENIERIA

DOCENTE: ING. FLORERO ORTUÑO OSCAR

AUXILIAR: UNIV. RAMOS K. ADALID

Cochabamba – 2021
EJERCICIO #1
CARACTERISTICAS PERSONALES.
DAMAS 6 INGLES, 6 PORTUGUÉS, 6 FRANCÉS, INCLUYE FECHA Y HORA DEL EJERCICIO EN EL
ÚLTIMO MENSAJE.

PROGRAM EJERCICIO1;

uses

FORMS,

DIALOGS,

SYSUTILS;

BEGIN

ShowMessage('HELLO MY NAME IS LUZETH PAOLA FLORES ACUÑA');

ShowMessage('I AM 21 YEARS');

ShowMessage('MY HEIGHT IS 1.55 CM');

ShowMessage('I HAVE CRISPY HAIR');

ShowMessage('MY FAVORITE FOOD IS PIQUE MACHO');

ShowMessage('I LIKE TO PLAY FOOTBALL');

ShowMessage('DESARROLLADO EL '+dateToStr(Date)+#13'A HORAS '+timeToStr(Time));

ShowMessage('GOSTO DE CAFÉ QUENTE')

ShowMessage('SOU DA COCHABAMBA');

ShowMessage('MEU ANIVERSÁRIO É 27 DE SETEMBRO');

ShowMessage('NÃO GOSTO DA TEMPORADA QUENTE');

ShowMessage('GOSTO DE CORRER DE MANHÃ');

ShowMessage('EU NÃO GOSTO DE BEBIDAS ALCOÓLICAS');

ShowMessage('DESARROLLADO EL '+dateToStr(Date)+#13'A HORAS '+timeToStr(Time));

ShowMessage('JE ME FÂCHE FACILEMENT');

ShowMessage('MES SOURCILS SONT TRÈS ÉPAIS');

ShowMessage('MES YEUX SONT FINS');

ShowMessage('J'aime écouter de la musique')

ShowMessage('GOSTO DA GASTRONOMIA DA COCHABAMBA');


ShowMessage('MA COULEUR PRÉFÉRÉE EST NOIR');

ShowMessage('DESARROLLADO EL '+dateToStr(Date)+#13'A HORAS '+timeToStr(Time));

END.

EJERCICIO #2

MAYOR DE 13 NUMEROS REALES (LUZETH PAOLA = 11).

unit EJERCICIO2;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Buttons;

type

TForm1 = class(TForm)

GroupBox1: TGroupBox;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

Label5: TLabel;
Label6: TLabel;

Label7: TLabel;

Label8: TLabel;

Label9: TLabel;

Label10: TLabel;

Label11: TLabel;

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit;

Edit4: TEdit;

Edit5: TEdit;

Edit6: TEdit;

Edit7: TEdit;

Edit8: TEdit;

Edit9: TEdit;

Edit10: TEdit;

Edit11: TEdit;

Label12: TLabel;

Edit12: TEdit;

BitBtn1: TBitBtn;

BitBtn2: TBitBtn;

procedure BitBtn1Click(Sender: TObject);

procedure BitBtn2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;
var

Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.BitBtn1Click(Sender: TObject);

VAR

A,B,C,D,E,F,G,H,I,J MAYOR:REAL;

begin

A:=strtofloat(edit1.Text);

B:=strtofloat(edit2.Text);

C:=strtofloat(edit3.Text);

D:=strtofloat(edit4.Text);

E:=strtofloat(edit5.Text);

F:=strtofloat(edit6.Text);

G:=strtofloat(edit7.Text);

H:=strtofloat(edit8.Text);

I:=strtofloat(edit9.Text);

J:=strtofloat(edit10.Text);

K:=strtofloat(edit11.Text);

MAYOR:=A;

if(N>MAYOR)then

begin

MAYOR:=B;

end;

if(P>MAYOR)then
begin

MAYOR:=C

end;

if(Q>MAYOR)then

begin

MAYOR:=D;

end;

if(R>MAYOR)then

begin

MAYOR:=E

end;

if(S>MAYOR)then

begin

MAYOR:=F

end;

if(T>MAYOR)then

begin

MAYOR:=G;

end;

if(U>MAYOR)then

begin

MAYOR:=H

end;

if(T>MAYOR)then

begin

MAYOR:=I;

end;

if(T>MAYOR)then

begin

MAYOR:=J;

end;
edit12.Text:=floattostr(MAYOR);

end;

procedure TForm1.BitBtn2Click(Sender: TObject);

begin

CLOS

end;

end.

EJERCICIO #4
CONVERTIR CM, METRO , PIE ,PULGADA , YARDA ,KM LONGITUDES

(PAOLA = 5)

unit EJERCICIO4;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Buttons;

type

TForm1 = class(TForm)

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

Label5: TLabel;

Edit1: TEdit;
Edit2: TEdit;

Edit3: TEdit;

Edit4: TEdit;

Edit5: TEdit;

Label6: TLabel;

BitBtn1: TBitBtn;

procedure Edit1KeyPress(Sender: TObject; var Key: Char);

procedure Edit2KeyPress(Sender: TObject; var Key: Char);

procedure Edit3KeyPress(Sender: TObject; var Key: Char)

procedure Edit4KeyPress(Sender: TObject; var Key: Char);

procedure Edit5KeyPress(Sender: TObject; var Key: Char);

procedure BitBtn1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

implementation

{$R *.dfm}
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);

var
cm,m,pie,pulg,yarda,km:double;
begin
if(key=#13)then
begin
cm:=strtofloat(edit1.text);
m:=cm/100;
pie:=cm*0.032808;
pulg:=cm*0.39370;
yarda:=cm*0.0109361;
km:=cm/100000;
edit2.text:=floattostr(m);
edit3.text:=floattostr(pie);
edit4.text:=floattostr(pulg);
edit5.text:=floattostr(yarda);
edit6.text:=floattostr(km); end; end;

procedure tform1.edit2keypress(sender: tobject; var key: char);


var
cm,m,pie,pulg,yarda,km:double;
begin
if(key=#13)then
begin
m:=strtofloat(edit2.text);
cm:=m/0.0100;
pie:=m*3.28081;
pulg:=m*39.370;
yarda:=m*1.09361;
km:=m/1000;
edit1.text:=floattostr(cm);
edit3.text:=floattostr(pie);
edit4.text:=floattostr(pulg);
edit5.text:=floattostr(yarda);
edit6.text:=floattostr(km);
end;
end;

procedure tform1.edit3keypress(sender: tobject; var key: char);


var
cm,m,pie,pulg,yarda,km:double;
begin
if(key=#13)then
begin
pie:=strtofloat(edit3.text);
cm:=pie/0.032808;
m:=pie/3.28081;
pulg:=pie*12.000;
yarda:=pie*0.333333;
km:=pie/3280.81;
edit1.text:=floattostr(cm);
edit2.text:=floattostr(m);
edit4.text:=floattostr(pulg);
edit5.text:=floattostr(yarda);
edit6.text:=floattostr(km);
end;
end;

procedure tform1.edit4keypress(sender: tobject; var key: char);


var
cm,m,pie,pulg,yarda,km:double;
begin
if(key=#13)then
begin
pulg:=strtofloat(edit4.text);
cm:=pulg/0.393700;
m:=pulg/39.3700;
pie:=pulg*0.0833333;
yarda:=pulg*0.027778;
km:=pulg/39370.0;
edit1.text:=floattostr(cm);
edit2.text:=floattostr(m);
edit3.text:=floattostr(pie);
edit5.text:=floattostr(yarda);
edit6.text:=floattostr(km);
end;
end;

procedure tform1.edit5keypress(sender: tobject; var key: char);


var
cm,m,pie,pulg,yarda,km:double;
begin
if(key=#13)then
begin
yarda:=strtofloat(edit5.text);
cm:=yarda/0.0109361;
m:=yarda/1.09361;
pie:=yarda/0.333333;
pulg:=yarda/0.027778;
km:=yarda/1093.61;
edit1.text:=floattostr(cm);
edit2.text:=floattostr(m);
edit3.text:=floattostr(pie);
edit4.text:=floattostr(pulg);
edit6.text:=floattostr(km);
end;
end;

procedure tform1.edit6keypress(sender: tobject; var key: char);


var
cm,m,pie,pulg,yarda,km:double;
begin
if(key=#13)then
begin
km:=strtofloat(edit6.text);
cm:=km*100000;
m:=km*1000;
pie:=km*3280.81;
pulg:=km*39370.0;
yarda:=km*1093.61;
edit1.text:=floattostr(cm);
edit2.text:=floattostr(m);
edit3.text:=floattostr(pie);
edit4.text:=floattostr(pulg);
edit5.text:=floattostr(yarda);
end; end; end.

procedure TForm1.BitBtn1Click(Sender: TObject);


begin CLOSE
end;
EJERCICIO #5
RAIZ APROXIMADA DE (LUZETH PAOLA = 11) DE
LUZETH PAOLA FLORES ACUÑA= 6565
√(11&6565)

unit EJERCICIO5;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Buttons;

type

TForm1 = class(TForm)

Label1: TLabel;

Edit1: TEdit;

GroupBox1: TGroupBox;

Label2: TLabel;

BitBtn1: TBitBtn;
procedure Edit1KeyPress(Sender: TObject; var Key: Char);

procedure BitBtn1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);

VAR

ANT,DIF,X,R:REAL;

begin

if(key=#13)then

begin

X:=strtofloat(edit1.Text)

R:=X/11;

repeat

ANT:=R;

R:=(11*ANT+X/(ANT*ANT*ANT*ANT*ANT*ANT*ANT*ANT*ANT*ANT*ANT))/11;
DIF:=ABS(X-(R*R*R*R*R*R*R*R*R*R*R*R*R))

Until (DIF<1E-6);

label2.Caption:='R='+floattostr(R);

end;

end;

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

close

end;

end

EJERCICIO #6
NOMINA DE EMPLEADOS
LUZETH PAOLA FLORES ACUÑA= 22

unit EJERCICIO6;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Buttons, StdCtrls;

type

TForm1 = class(TForm)

Label1: TLabel;

Label2: TLabel;
Edit1: TEdit;

Edit2: TEdit;

Button1: TButton;

BitBtn1: TBitBtn;

procedure Edit1KeyPress(Sender: TObject; var Key: Char);

procedure Button1Click(Sender: TObject);

procedure BitBtn1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char)

begin

if key=#13 then Button1.SetFocus;

if not (key in ['0'..'9',#8])then key:=#0

end;
procedure TForm1.Button1Click(Sender: TObject);

var i,n,cont:integer;

suma,t:real;

begin

try

n:=StrToint(edit1.Text)

suma:=0;

for i:=1 to n do

begin

cont:=1;t:=1;

while cont<=i do

begin

t:=t*i/cont;

cont:=cont+1

end;

suma:=suma+t

end;

Edit2.Text:=FloatToStr(suma);

Edit1.SetFocus;

Edit1.SelStart:=0;

Edit1.SelLength:=Length(edit1.Text)

except

on EConvertError do

Showmessage('EL NUMERO ES MUY GRANDE')

end
end;

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

CLOSE

end;

end.

EJERCICIO #8
Caratula De Presentación De Computación
procedure TForm1.FormPaint(Sender: TObject); begin
with canvas do begin

pen.Color:=clred; //MARGEN DE LA HOJA pen.Width:=3;

polyline([point(25,25),point(382,25),point(382,508),point(25,508),point(25,25)]);

pen.color:=clblack; //UNIVERSIDAD MAYOR DE SAN SIMON pen.width:=2;Z

polyline([point(75,35),point(75,45),

point(85,45),point(85,35)]); polyline([point(90,45),point(90,35),point(100,45),point(100,35)]);
polyline([point(105,35),point(105,45)]);

polyline([point(110,35),point(115,45),point(120,35)]);

polyline([point(135,35),point(125,35),point(125,40),point(135,40),point(125,40),point(125,45),point(135,45)]);
polyline([point(140,45),point(140,35),point(150,35),point(150,40),point(140,40),point(150,45)]);
polyline([point(165,35),point(155,35),point(155,40),point(165,40),point(165,45),point(155,45)]);
polyline([point(170,35),point(170,45)]);

polyline([point(175,35),point(185,40),point(175,45),point(175,35)]);

polyline([point(190,45),point(190,35),point(200,35),point(200,40),point(190,40),point(200,40),point(200,45)]);
polyline([point(205,35),point(215,40),point(205,45),point(205,35)]);

//TITULO DE LA CARATULA O MATERIA pen.width:=5;

polyline([point(70,90),point(50,90),point(50,130),point(70,130)]);

polyline([point(80,90),point(100,90),point(100,130),point(80,130),point(80,90)]);
polyline([point(110,130),point(110,90),point(120,110),point(130,90),point(130,130)]);
polyline([point(140,130),point(140,90),point(160,90),point(160,110),point(140,110)]);
polyline([point(170,90),point(170,130),point(190,130),point(190,90)]);
polyline([point(200,90),point(210,90),point(210,130),point(210,90),point(220,90)]);

polyline([point(230,130),point(230,90),point(250,90),point(250,110),point(230,110),point(250,110),point(250,130)]);
polyline([point(280,90),point(260,90),point(260,130),point(280,130)]); polyline([point(290,90),point(290,130)]);
polyline([point(300,90),point(320,90),point(320,130),point(300,130),point(300,90)]);
polyline([point(330,130),point(330,90),point(350,130),point(350,90)]);

polyline([point(140,180),point(140,140),point(160,140),point(160,160),point(140,160)]);
polyline([point(170,180),point(170,140),point(190,140),point(190,160),point(170,160),point(190,160),point(190,180)]);
polyline([point(200,180),point(200,140),point(220,140),point(220,160),point(200,160),point(220,180)]);
polyline([point(230,180),point(230,140),point(250,140),point(250,160),point(230,160),point(250,160),point(250,180)]);

polyline([point(60,190),point(60,230)]);

polyline([point(70,230),point(70,190),point(90,230),point(90,190)]);

polyline([point(120,190),point(100,190),point(100,230),point(120,230),point(120,210),point(110,210)]);
polyline([point(150,190),point(130,190),point(130,210),point(150,210),point(130,210),point(130,230),point(150,230)]);
polyline([point(160,230),point(160,190),point(180,230),point(180,190)]); polyline([point(190,190),point(190,230)]);
polyline([point(220,190),point(200,190),point(200,210),point(220,210),point(200,210),point(200,230),point(220,230)]);
polyline([point(230,230),point(230,190),point(250,190),point(250,210),point(230,210),point(250,230)]);
polyline([point(260,190),point(260,230)]);
polyline([point(270,230),point(270,190),point(290,190),point(290,210),point(270,210),point(290,210),point(290,230)]);

pen.color:=clred; //DATOS DE LA CARATULA pen.width:=3;

polyline([point(70,260),point(80,265),point(70,270),point(70,260)]);
polyline([point(85,260),point(95,260),point(95,270),point(85,270),point(85,260)]);
polyline([point(110,260),point(100,260),point(100,270),point(110,270)]);
polyline([point(125,260),point(115,260),point(115,265),point(120,265),point(115,265),point(115,270),point(125,270)]);
polyline([point(130,270),point(130,260),point(140,270),point(140,260)]);
polyline([point(145,260),point(150,260),point(150,270),point(150,260),point(155,260)]);
polyline([point(170,260),point(160,260),point(160,265),point(165,265),point(160,265),point(160,270),point(170,270)]);

pen.color:=clblack; //DATOS DE LA CARATULA pen.width:=2;

polyline([point(180,260),point(180,270)]);

polyline([point(185,270),point(185,260),point(190,270),point(190,260)]);

polyline([point(200,260),point(195,260),point(195,270),point(200,270),point(200,265),point(195,265)]);
polyline([point(210,260),point(205,260),point(205,265),point(208,265),point(205,265),point(205,270)]);
polyline([point(215,260),point(215,270),point(220,270)]);

polyline([point(225,260),point(230,260),point(230,270),point(225,270),point(225,260)]);
polyline([point(235,270),point(235,260),point(240,260),point(240,265),point(235,265),point(240,270)]);
polyline([point(250,260),point(245,260),point(245,265),point(248,265),point(245,265),point(245,270),point(250,270)]);
polyline([point(255,270),point(255,260),point(260,260),point(260,265),point(255,265),point(260,270)]);
polyline([point(265,260),point(270,260),point(270,270),point(265,270),point(265,260)]);
polyline([point(280,260),point(285,260),point(285,270),point(280,270),point(280,260)]);
polyline([point(290,270),point(290,260),point(295,260),point(295,265),point(290,265),point(295,270)]);
polyline([point(300,260),point(303,260),point(303,270),point(303,260),point(305,260)]);
polyline([point(310,260),point(310,270),point(315,270),point(315,260)]);
polyline([point(320,270),point(320,260),point(325,270),point(325,260)]); polyline([point(321,258),point(324,258)]);

polyline([point(330,260),point(335,260),point(335,270),point(330,270),point(330,260)]);

polyline([point(235,280),point(240,280),point(240,290),point(235,290),point(235,280)]);
polyline([point(250,280),point(245,280),point(245,285),point(250,285),point(250,290),point(245,290)]);
polyline([point(260,280),point(255,280),point(255,290),point(260,290)]);
polyline([point(265,290),point(265,280),point(270,280),point(270,285),point(265,285),point(270,285),point(270,290)]);
polyline([point(275,290),point(275,280),point(280,280),point(280,285),point(275,285),point(280,290)]);
EJERCICIO #10

CIRCULOS DINÁMICOS

unit EJERCICIO10;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, ExtCtrls;

type

TForm1 = class(TForm)

Timer1: TTimer;

procedure Timer1Timer(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);

VAR

x,y,dy,dx:integer;

begin

x:=random(screen.Width-10);

y:=random(screen.Height-10);

canvas.Pen.Color:=random(65535);

canvas.Pen.Width:=random(7);

dx:=random(400);

dy:=random(400);

canvas.Ellipse(x,y,x+dx,y+dx);

end

end.

You might also like