SlideShare a Scribd company logo
unit Unit1;<br />interface<br />uses<br />  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br />  Dialogs, StdCtrls;<br />type<br />  TForm1 = class(TForm) <br />    Edit1: TEdit;<br />    Button1: TButton;<br />    Edit2: TEdit;<br />    Button2: TButton;<br />    Button3: TButton;<br />    procedure Button1Click(Sender: TObject);<br />    procedure Button2Click(Sender: TObject);<br />    procedure Button3Click(Sender: TObject);<br />  private<br />    { Private declarations }<br />  public<br />    { Public declarations }<br />  end;<br />var<br />  Form1: TForm1;<br />implementation<br />{$R *.dfm}<br />function suma (a,b:integer):integer;<br />begin<br />result:= a+b;<br />end;<br />procedure TForm1.Button1Click(Sender: TObject);<br />   var<br />   S:integer;<br />begin<br />             s:=suma(strtoint(Edit1.text),strtoint(Edit2.text));<br />             showmessage(Inttostr(s));<br />end;<br />function potencia(a,b,c,acum:integer):integer;<br />begin<br />c:=1;<br />acum:=1;<br />while(c<=b)do<br />begin<br />acum:=acum*a;<br />c:=c+1;<br />end;<br />result:=acum;<br />end;<br />procedure TForm1.Button2Click(Sender: TObject);<br />var<br />X,c,acum:integer;<br />begin<br />c:=0;<br />acum:=0;<br />       x:=potencia(strtoint(Edit1.text),strtoint(Edit2.text),c,acum);<br />       showmessage(Inttostr(X));<br />end;<br />  function triangulo(b,h:integer):integer;<br />  begin<br />  result:=b*h;<br />  end;<br />procedure TForm1.Button3Click(Sender: TObject);<br />var<br />z:integer;<br />begin<br />     z:=triangulo(strtoint(Edit1.text),strtoint(Edit2.text));<br />     showmessage(Inttostr(z));<br />end;<br />end.<br />
Unit unit1
Unit unit1

More Related Content

Similar to Unit unit1

delphi part 2.pdf
delphi part 2.pdfdelphi part 2.pdf
delphi part 2.pdf
Jurnal IT
 
Calculator Program in C#.NET
Calculator Program in C#.NET Calculator Program in C#.NET
Calculator Program in C#.NET
Dhairya Joshi
 
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdfC# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdf
fathimalinks
 
JAVA AND MYSQL QUERIES
JAVA AND MYSQL QUERIES JAVA AND MYSQL QUERIES
JAVA AND MYSQL QUERIES Aditya Shah
 
Burger doll order form
Burger doll order formBurger doll order form
Burger doll order form
Khairi Aiman
 
SPF WinForm Programs
SPF WinForm ProgramsSPF WinForm Programs
SPF WinForm Programs
Hock Leng PUAH
 
ملخص البرمجة المرئية - الوحدة الثالثة
ملخص البرمجة المرئية - الوحدة الثالثةملخص البرمجة المرئية - الوحدة الثالثة
ملخص البرمجة المرئية - الوحدة الثالثة
جامعة القدس المفتوحة
 
Delphi L03 Forms and Input
Delphi L03 Forms and InputDelphi L03 Forms and Input
Delphi L03 Forms and InputMohammad Shaker
 

Similar to Unit unit1 (10)

delphi part 2.pdf
delphi part 2.pdfdelphi part 2.pdf
delphi part 2.pdf
 
Calculator Program in C#.NET
Calculator Program in C#.NET Calculator Program in C#.NET
Calculator Program in C#.NET
 
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdfC# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdf
 
JAVA AND MYSQL QUERIES
JAVA AND MYSQL QUERIES JAVA AND MYSQL QUERIES
JAVA AND MYSQL QUERIES
 
Burger doll order form
Burger doll order formBurger doll order form
Burger doll order form
 
SPF WinForm Programs
SPF WinForm ProgramsSPF WinForm Programs
SPF WinForm Programs
 
ملخص البرمجة المرئية - الوحدة الثالثة
ملخص البرمجة المرئية - الوحدة الثالثةملخص البرمجة المرئية - الوحدة الثالثة
ملخص البرمجة المرئية - الوحدة الثالثة
 
Delphi L03 Forms and Input
Delphi L03 Forms and InputDelphi L03 Forms and Input
Delphi L03 Forms and Input
 
Calculadora
CalculadoraCalculadora
Calculadora
 
Calculadora
CalculadoraCalculadora
Calculadora
 

More from onlyhenry

Matematica discreta recurcividad
Matematica discreta recurcividadMatematica discreta recurcividad
Matematica discreta recurcividadonlyhenry
 
Procesuales np parcialnp2nfextras
Procesuales np parcialnp2nfextrasProcesuales np parcialnp2nfextras
Procesuales np parcialnp2nfextras
onlyhenry
 
Public string sacar
Public string sacarPublic string sacar
Public string sacar
onlyhenry
 
Public string sacar
Public string sacarPublic string sacar
Public string sacaronlyhenry
 
Public class c
Public class cPublic class c
Public class c
onlyhenry
 

More from onlyhenry (7)

Matematica discreta recurcividad
Matematica discreta recurcividadMatematica discreta recurcividad
Matematica discreta recurcividad
 
Notas
NotasNotas
Notas
 
Procesuales np parcialnp2nfextras
Procesuales np parcialnp2nfextrasProcesuales np parcialnp2nfextras
Procesuales np parcialnp2nfextras
 
Llamada
LlamadaLlamada
Llamada
 
Public string sacar
Public string sacarPublic string sacar
Public string sacar
 
Public string sacar
Public string sacarPublic string sacar
Public string sacar
 
Public class c
Public class cPublic class c
Public class c
 

Recently uploaded

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Unit unit1

  • 1. unit Unit1;<br />interface<br />uses<br /> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br /> Dialogs, StdCtrls;<br />type<br /> TForm1 = class(TForm) <br /> Edit1: TEdit;<br /> Button1: TButton;<br /> Edit2: TEdit;<br /> Button2: TButton;<br /> Button3: TButton;<br /> procedure Button1Click(Sender: TObject);<br /> procedure Button2Click(Sender: TObject);<br /> procedure Button3Click(Sender: TObject);<br /> private<br /> { Private declarations }<br /> public<br /> { Public declarations }<br /> end;<br />var<br /> Form1: TForm1;<br />implementation<br />{$R *.dfm}<br />function suma (a,b:integer):integer;<br />begin<br />result:= a+b;<br />end;<br />procedure TForm1.Button1Click(Sender: TObject);<br /> var<br /> S:integer;<br />begin<br /> s:=suma(strtoint(Edit1.text),strtoint(Edit2.text));<br /> showmessage(Inttostr(s));<br />end;<br />function potencia(a,b,c,acum:integer):integer;<br />begin<br />c:=1;<br />acum:=1;<br />while(c<=b)do<br />begin<br />acum:=acum*a;<br />c:=c+1;<br />end;<br />result:=acum;<br />end;<br />procedure TForm1.Button2Click(Sender: TObject);<br />var<br />X,c,acum:integer;<br />begin<br />c:=0;<br />acum:=0;<br /> x:=potencia(strtoint(Edit1.text),strtoint(Edit2.text),c,acum);<br /> showmessage(Inttostr(X));<br />end;<br /> function triangulo(b,h:integer):integer;<br /> begin<br /> result:=b*h;<br /> end;<br />procedure TForm1.Button3Click(Sender: TObject);<br />var<br />z:integer;<br />begin<br /> z:=triangulo(strtoint(Edit1.text),strtoint(Edit2.text));<br /> showmessage(Inttostr(z));<br />end;<br />end.<br />