SlideShare a Scribd company logo
1 of 11
LAPORAN PRAKTIKUM
PEMROGRAMAN KOMPUTER DAN KOMPUTASI NUMERIK
CONDITIONAL STATEMENTS
DI SUSUN OLEH :
NAMA : DWI LESTARI
NIM : 021100295
PRODI : ELEKTRONIKA INSTRUMENTASI
SEMETER : 3
ASISTEN : BUDI SUHENDRO, SST
SEKOLAH TINGGI TEKNOLOGI NUKLIR
BADAN TENAGA NUKLIR NASIONAL
YOGYAKARTA
2013
CONDITIONAL STATMENTS
Tujuan : untuk memahami perintah conditional statements
Langkah Kerja :
1. Masuk ke program delphi.
2. Klik pada halaman form 1.
3. Buat form seperti gambar berikut.
4. Pada “golongan” di buat dengan cara mengeklik ikon combo box, sedangkan
“masa kerja” dan “jumlah anak” di buat dengan menggunakan ikon radio group,
lalu buat pilihan menggunakan radio button.
5. Pada “golongan” beri pilihan “A” dan “B” dengan cara mengeklik ikon items pada
properties.
6. Setelah itu masukkan perintah-perintah yang sesuai dengan keinginan pada
halaman unit1, isi masukan perintah seperti pada halaman lampiran.
7. Setelah semua di masukkan jalankan program dengan mengeklik tombol f9 atau
run pada ikon delphi.
8. Hasil yang akan tampak saat program di jalankan :
KESIMPULAN
1. Com box digunakan untuk memberi pilihan sub menu pada kolom masa kerja dan
jumlah anak.
2. Pada conditional statement dapat menggunakan perintah IF.. THEN...ELSE..
sehingga memudahkan penginutan perintah.
LAMPIRAN
Hasil Masukan Pada Unit1
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
RadioGroup1: TRadioGroup;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
ComboBox1: TComboBox;
RadioGroup2: TRadioGroup;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Label4: TLabel;
Edit3: TEdit;
Label5: TLabel;
Edit4: TEdit;
Label6: TLabel;
Label7: TLabel;
Edit5: TEdit;
Edit6: TEdit;
Button1: TButton;
Label8: TLabel;
Edit7: TEdit;
RadioButton6: TRadioButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Label9: TLabel;
procedure ComboBox1Change(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton3Click(Sender: TObject);
procedure RadioButton4Click(Sender: TObject);
procedure RadioButton5Click(Sender: TObject);
procedure RadioButton6Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
gajipokok,insentif,tunjangan,gajitotal:real;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if combobox1.text='A' then
begin
edit1.Text:='1000000'
end
else
if combobox1.text='B' then
edit1.Text:='2000000'
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
begin
if radiobutton2.Checked=true then
edit2.Text:='500000'
end;
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
if radiobutton1.Checked=true then
edit2.Text:='200000'
end;
procedure TForm1.RadioButton3Click(Sender: TObject);
begin
if radiobutton3.Checked=true then
edit3.Text:='0'
end;
procedure TForm1.RadioButton4Click(Sender: TObject);
begin
if radiobutton4.Checked=true then
edit3.Text:='200000'
end;
procedure TForm1.RadioButton5Click(Sender: TObject);
begin
if radiobutton5.Checked=true then
edit3.Text:='400000'
end;
procedure TForm1.RadioButton6Click(Sender: TObject);
begin
if radiobutton6.Checked=true then
edit3.Text:='500000'
end;
procedure TForm1.Button1Click(Sender: TObject);
var
gajipokok,insentif,tunjangan,gajitotal:real;
begin
gajipokok:=strtofloat(edit1.Text);
insentif:=strtofloat(edit2.text);
tunjangan:=strtofloat(edit3.text);
gajitotal:=gajipokok+insentif+tunjangan;
form1.Edit4.Text:=floattostr(gajitotal);
form1.show;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
gajitotal,pajak:real;
begin
pajak:=0;
gajitotal:=strtofloat(edit4.Text) ;
if gajitotal >= 2750000 then
begin
pajak:=gajitotal*0.1;
edit5.Text:=floattostr(pajak);
edit6.Text:=floattostr(gajitotal-pajak);
end
end;
procedure TForm1.Button3Click(Sender: TObject);
var
gajitotal,pajak:real;
begin
pajak:=0;
gajitotal:=strtofloat(edit4.Text) ;
if gajitotal >= 2250000 then
begin
pajak:=gajitotal*0.05;
edit5.Text:=floattostr(pajak);
edit6.Text:=floattostr(gajitotal-pajak);
end
end;
procedure TForm1.Button4Click(Sender: TObject);
var
gajitotal,pajak:real;
begin
pajak:=0;
gajitotal:=strtofloat(edit4.Text) ;
if gajitotal < 2250000 then
begin
pajak:=gajitotal*0.0;
edit5.Text:=floattostr(pajak);
edit6.Text:=floattostr(gajitotal-pajak);
end;
end;
end.

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Laporan conditional statements

  • 1. LAPORAN PRAKTIKUM PEMROGRAMAN KOMPUTER DAN KOMPUTASI NUMERIK CONDITIONAL STATEMENTS DI SUSUN OLEH : NAMA : DWI LESTARI NIM : 021100295 PRODI : ELEKTRONIKA INSTRUMENTASI SEMETER : 3 ASISTEN : BUDI SUHENDRO, SST SEKOLAH TINGGI TEKNOLOGI NUKLIR BADAN TENAGA NUKLIR NASIONAL YOGYAKARTA 2013
  • 2. CONDITIONAL STATMENTS Tujuan : untuk memahami perintah conditional statements Langkah Kerja : 1. Masuk ke program delphi. 2. Klik pada halaman form 1. 3. Buat form seperti gambar berikut.
  • 3. 4. Pada “golongan” di buat dengan cara mengeklik ikon combo box, sedangkan “masa kerja” dan “jumlah anak” di buat dengan menggunakan ikon radio group, lalu buat pilihan menggunakan radio button. 5. Pada “golongan” beri pilihan “A” dan “B” dengan cara mengeklik ikon items pada properties. 6. Setelah itu masukkan perintah-perintah yang sesuai dengan keinginan pada halaman unit1, isi masukan perintah seperti pada halaman lampiran. 7. Setelah semua di masukkan jalankan program dengan mengeklik tombol f9 atau run pada ikon delphi. 8. Hasil yang akan tampak saat program di jalankan :
  • 4.
  • 5.
  • 6.
  • 7. KESIMPULAN 1. Com box digunakan untuk memberi pilihan sub menu pada kolom masa kerja dan jumlah anak. 2. Pada conditional statement dapat menggunakan perintah IF.. THEN...ELSE.. sehingga memudahkan penginutan perintah.
  • 8. LAMPIRAN Hasil Masukan Pada Unit1 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Label1: TLabel; RadioGroup1: TRadioGroup; RadioButton1: TRadioButton; RadioButton2: TRadioButton; ComboBox1: TComboBox; RadioGroup2: TRadioGroup; RadioButton3: TRadioButton; RadioButton4: TRadioButton; RadioButton5: TRadioButton; Label2: TLabel; Label3: TLabel; Edit1: TEdit; Edit2: TEdit; Label4: TLabel; Edit3: TEdit; Label5: TLabel; Edit4: TEdit; Label6: TLabel; Label7: TLabel; Edit5: TEdit; Edit6: TEdit; Button1: TButton; Label8: TLabel; Edit7: TEdit; RadioButton6: TRadioButton; Button2: TButton; Button3: TButton; Button4: TButton; Label9: TLabel; procedure ComboBox1Change(Sender: TObject); procedure RadioButton2Click(Sender: TObject); procedure RadioButton1Click(Sender: TObject); procedure RadioButton3Click(Sender: TObject); procedure RadioButton4Click(Sender: TObject);
  • 9. procedure RadioButton5Click(Sender: TObject); procedure RadioButton6Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); private { Private declarations } public { Public declarations } gajipokok,insentif,tunjangan,gajitotal:real; end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.ComboBox1Change(Sender: TObject); begin if combobox1.text='A' then begin edit1.Text:='1000000' end else if combobox1.text='B' then edit1.Text:='2000000' end; procedure TForm1.RadioButton2Click(Sender: TObject); begin if radiobutton2.Checked=true then edit2.Text:='500000' end; procedure TForm1.RadioButton1Click(Sender: TObject); begin if radiobutton1.Checked=true then edit2.Text:='200000' end; procedure TForm1.RadioButton3Click(Sender: TObject); begin if radiobutton3.Checked=true then edit3.Text:='0'
  • 10. end; procedure TForm1.RadioButton4Click(Sender: TObject); begin if radiobutton4.Checked=true then edit3.Text:='200000' end; procedure TForm1.RadioButton5Click(Sender: TObject); begin if radiobutton5.Checked=true then edit3.Text:='400000' end; procedure TForm1.RadioButton6Click(Sender: TObject); begin if radiobutton6.Checked=true then edit3.Text:='500000' end; procedure TForm1.Button1Click(Sender: TObject); var gajipokok,insentif,tunjangan,gajitotal:real; begin gajipokok:=strtofloat(edit1.Text); insentif:=strtofloat(edit2.text); tunjangan:=strtofloat(edit3.text); gajitotal:=gajipokok+insentif+tunjangan; form1.Edit4.Text:=floattostr(gajitotal); form1.show; end; procedure TForm1.Button2Click(Sender: TObject); var gajitotal,pajak:real; begin pajak:=0; gajitotal:=strtofloat(edit4.Text) ; if gajitotal >= 2750000 then begin pajak:=gajitotal*0.1; edit5.Text:=floattostr(pajak); edit6.Text:=floattostr(gajitotal-pajak); end end; procedure TForm1.Button3Click(Sender: TObject); var gajitotal,pajak:real; begin
  • 11. pajak:=0; gajitotal:=strtofloat(edit4.Text) ; if gajitotal >= 2250000 then begin pajak:=gajitotal*0.05; edit5.Text:=floattostr(pajak); edit6.Text:=floattostr(gajitotal-pajak); end end; procedure TForm1.Button4Click(Sender: TObject); var gajitotal,pajak:real; begin pajak:=0; gajitotal:=strtofloat(edit4.Text) ; if gajitotal < 2250000 then begin pajak:=gajitotal*0.0; edit5.Text:=floattostr(pajak); edit6.Text:=floattostr(gajitotal-pajak); end; end; end.