SlideShare a Scribd company logo
1 of 11
INFORMATIKA
KELAS C
dasar
pemrograman
PASCAL
PROSEDUR DAN FUNGSI
ANGGOTA :
KELOMPOK 2C
INFORMATIKA KELAS C
MUHAMMAD YUSRIL FAUZI : 227006067
MUKHLIS HANAFI : 227006070
RAMZI SAPUTRA : 227006089
RIZKY MOCHAMMAD GANI : 227006076
Prosedur adalah serangkaian statement yang digunakan
untuk memecahkan sebuah masalah. Prosedur memiliki nama
dan parameter. Prosedur harus dideklarasikan terlebih
dahulu sebelum dipanggil atau digunakan.
PASCAL
1.DEFINISI PROSEDUR
Fungsi adalah sebuah deklarasi yang digunakan untuk
menghitung sebuah nilai berdasar satu atau beberapa nilai
masukan. Dalam Pascal, fungsi akan membantu mewujudkan
pemecahan masalah yang lebih sederhana, sehingga program
semakin mudah dibaca dan lebih mudah diubah atau
dimodifikasi.
2.DEFINISI FUNGSI
PASCAL
3.KONSEP TEORI PROSEDUR
Konsep Teori Prosedur pada Pascal adalah sebagai berikut:
Procedure nama-prosedur (parameter input ; var parameter
output);
begin
{statemen implementasi prosedur (badan prosedur), hasil
perhitungan yang dilakukan prosedur (jika ada),
disimpan pada parameter output}
end;
Function nama-fungsi (parameter) : tipe-
hasil;
begin
{statemen-statemen implementasi fungsi}
Nama-fungsi := nilai yang dikirimkan/hasil
end;
4.KONSEP TEORI FUNGSI
Function nama-fungsi (parameter) : tipe-
hasil;
begin
{statemen-statemen implementasi fungsi}
Nama-fungsi := nilai yang dikirimkan/hasil
end;
4.KONSEP TEORI FUNGSI
5.CONTOH PENGIMPLEMENTASIAN
PROCEDURE PADA PASCAL
1.program contoh_1
var
a, b, c : integer;
procedure maxsimum;
var
max : integer;
begin
if (a > b) then
max := c
if (c > max) then
max := c;
writeln (max);
end;
begin
readln (a,b,c);
maksimum;
end.
2.program contoh_2
var
p, l, t, vol, panjang : real;
procedure kotak;
var
v, pl : real;
begin
v := p * l * t;
pl := p + 2.0 * t;
writeln (v, pl);
end;
begin
writeln(‘panjang’:10, ‘lebar’
:10,‘tinggi’:10);
readln (p, l, t);
kotak;
end.
6.CONTOH PENGIMPLEMENTASIAN
fungsi PADA PASCAL
1. program terbesar;
var
angka1, angka2 : integer;
terbesar : integer;
function maks (a,b : integer) : integer;
begin
if (a > b) then
maks := a;
else
maks := b;
end;
begin
write (‘angka pertama = ’); readln (angka1);
write (‘angka kedua = ’); readln (angka2);
terbesar := maks (angka1,angka2)’;
write (‘angka terbesar adalah’,terbesar);
end.
2. PROGRAM kurs_uang;
var
rupiah, kursdolar : integer;
dolar : real;
function nilaidolar (rp,kurs : integer) : real;
begin
nilaidolar := rp/kurs;
end;
begin
write (‘masukan nilai rupiah = ’); readln
(rupiah);
write (‘kurs 1 dolar = ’); readln (kursdolar);
dolar := nilaidolar (rupiah,kursdolar);
write (‘Rp’ , rupiah , ‘=’ , dolar:3:2 , ‘dolar’);
end.
7.kesimpulan
D a r i p e m b a h a s a n d i a t a s d a p a t d i s i m p u l k a n b a h w a
P a s c a l m e m e l i k i b e b e r a p a j e n i s d e k l a r a s i ,
d i a n t a r a n y a a d a P r o s e d u r d a n F u n g s i , P r o s e d u r
m e r u p a k a n s e r a n g k a i a n s t a t e m e n t y a n g d i g u n a k a n
u n t u k m e m e c a h k a n s e b u a h m a s a l a h s e d a n g k a n
F u n g s i a d a l a h s e b u a h d e k l a r a s i y a n g d i g u n a k a n
u n t u k m e n g h i t u n g s e b u a h n i l a i b e r d a s a r k a n s a t u
a t a u b e b e r a p a n i l a i m a s u k a n .
any questions?

More Related Content

Recently uploaded

443016507-Sediaan-obat-PHYCOPHYTA-MYOPHYTA-dan-MYCOPHYTA-pptx.pptx
443016507-Sediaan-obat-PHYCOPHYTA-MYOPHYTA-dan-MYCOPHYTA-pptx.pptx443016507-Sediaan-obat-PHYCOPHYTA-MYOPHYTA-dan-MYCOPHYTA-pptx.pptx
443016507-Sediaan-obat-PHYCOPHYTA-MYOPHYTA-dan-MYCOPHYTA-pptx.pptxErikaPutriJayantini
 
MODUL AJAR BAHASA INDONESIA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR BAHASA INDONESIA KELAS 2 KURIKULUM MERDEKA.pdfMODUL AJAR BAHASA INDONESIA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR BAHASA INDONESIA KELAS 2 KURIKULUM MERDEKA.pdfAndiCoc
 
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdfMODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdfAndiCoc
 
Demokrasi dan Pendidikan Demokrasi kwn ppt.ppt
Demokrasi dan Pendidikan Demokrasi kwn ppt.pptDemokrasi dan Pendidikan Demokrasi kwn ppt.ppt
Demokrasi dan Pendidikan Demokrasi kwn ppt.pptretno12886
 
perwalian IKLIM SEKOLAH AMAN Mencegah Intoleransi.pptx
perwalian IKLIM SEKOLAH AMAN Mencegah Intoleransi.pptxperwalian IKLIM SEKOLAH AMAN Mencegah Intoleransi.pptx
perwalian IKLIM SEKOLAH AMAN Mencegah Intoleransi.pptxMas PauLs
 
Lokakarya tentang Kepemimpinan Sekolah 1.pptx
Lokakarya tentang Kepemimpinan Sekolah 1.pptxLokakarya tentang Kepemimpinan Sekolah 1.pptx
Lokakarya tentang Kepemimpinan Sekolah 1.pptxrani414352
 
MODUL AJAR MATEMATIKA KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR MATEMATIKA KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 5 KURIKULUM MERDEKA.pdfAndiCoc
 
Obat pada masa kehamilan: uteretonik dan tokolitik
Obat pada masa kehamilan: uteretonik dan tokolitikObat pada masa kehamilan: uteretonik dan tokolitik
Obat pada masa kehamilan: uteretonik dan tokolitikNegustinNegustin
 
Analisis Regresi Analisis Regresi dan Korelasi.ppt
Analisis Regresi Analisis Regresi dan Korelasi.pptAnalisis Regresi Analisis Regresi dan Korelasi.ppt
Analisis Regresi Analisis Regresi dan Korelasi.pptRahmaniaPamungkas2
 
P5 Gaya Hidup berkelanjutan gaya hidup b
P5 Gaya Hidup berkelanjutan gaya hidup bP5 Gaya Hidup berkelanjutan gaya hidup b
P5 Gaya Hidup berkelanjutan gaya hidup bSisiliaFil
 
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdfAndiCoc
 
prinsip dasar kepramukaan dan metode kepramukaan
prinsip dasar kepramukaan dan metode kepramukaanprinsip dasar kepramukaan dan metode kepramukaan
prinsip dasar kepramukaan dan metode kepramukaanaji guru
 
MODUL AJAR SENI TARI KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI TARI KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR SENI TARI KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI TARI KELAS 5 KURIKULUM MERDEKA.pdfAndiCoc
 
Materi: Mengapa tidak memanfaatkan Media ?
Materi: Mengapa tidak memanfaatkan Media ?Materi: Mengapa tidak memanfaatkan Media ?
Materi: Mengapa tidak memanfaatkan Media ?AdePutraTunggali
 
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdfMODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdfAndiCoc
 
METODE PENGEMBANGAN MORAL DAN NILAI-NILAI AGAMA.pptx
METODE PENGEMBANGAN MORAL DAN NILAI-NILAI AGAMA.pptxMETODE PENGEMBANGAN MORAL DAN NILAI-NILAI AGAMA.pptx
METODE PENGEMBANGAN MORAL DAN NILAI-NILAI AGAMA.pptxFidiaHananasyst
 
Aksi Nyata Cegah Perundungan Mulai dari Kelas [Guru].pptx
Aksi Nyata Cegah Perundungan Mulai dari Kelas [Guru].pptxAksi Nyata Cegah Perundungan Mulai dari Kelas [Guru].pptx
Aksi Nyata Cegah Perundungan Mulai dari Kelas [Guru].pptxAgusSuarno2
 
MODUL AJAR PENDIDIKAN AGAMA ISLAM & BUDI PEKERTI (PAIBP) KELAS 5.pdf
MODUL AJAR PENDIDIKAN AGAMA ISLAM & BUDI PEKERTI (PAIBP) KELAS 5.pdfMODUL AJAR PENDIDIKAN AGAMA ISLAM & BUDI PEKERTI (PAIBP) KELAS 5.pdf
MODUL AJAR PENDIDIKAN AGAMA ISLAM & BUDI PEKERTI (PAIBP) KELAS 5.pdfAndiCoc
 
UAS Matematika kelas IX 2024 HK_2024.pdf
UAS Matematika kelas IX 2024 HK_2024.pdfUAS Matematika kelas IX 2024 HK_2024.pdf
UAS Matematika kelas IX 2024 HK_2024.pdfssuser29a952
 
MODUL AJAR PENDIDIKAN PANCASILA KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR PENDIDIKAN PANCASILA KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR PENDIDIKAN PANCASILA KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR PENDIDIKAN PANCASILA KELAS 5 KURIKULUM MERDEKA.pdfAndiCoc
 

Recently uploaded (20)

443016507-Sediaan-obat-PHYCOPHYTA-MYOPHYTA-dan-MYCOPHYTA-pptx.pptx
443016507-Sediaan-obat-PHYCOPHYTA-MYOPHYTA-dan-MYCOPHYTA-pptx.pptx443016507-Sediaan-obat-PHYCOPHYTA-MYOPHYTA-dan-MYCOPHYTA-pptx.pptx
443016507-Sediaan-obat-PHYCOPHYTA-MYOPHYTA-dan-MYCOPHYTA-pptx.pptx
 
MODUL AJAR BAHASA INDONESIA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR BAHASA INDONESIA KELAS 2 KURIKULUM MERDEKA.pdfMODUL AJAR BAHASA INDONESIA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR BAHASA INDONESIA KELAS 2 KURIKULUM MERDEKA.pdf
 
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdfMODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdf
 
Demokrasi dan Pendidikan Demokrasi kwn ppt.ppt
Demokrasi dan Pendidikan Demokrasi kwn ppt.pptDemokrasi dan Pendidikan Demokrasi kwn ppt.ppt
Demokrasi dan Pendidikan Demokrasi kwn ppt.ppt
 
perwalian IKLIM SEKOLAH AMAN Mencegah Intoleransi.pptx
perwalian IKLIM SEKOLAH AMAN Mencegah Intoleransi.pptxperwalian IKLIM SEKOLAH AMAN Mencegah Intoleransi.pptx
perwalian IKLIM SEKOLAH AMAN Mencegah Intoleransi.pptx
 
Lokakarya tentang Kepemimpinan Sekolah 1.pptx
Lokakarya tentang Kepemimpinan Sekolah 1.pptxLokakarya tentang Kepemimpinan Sekolah 1.pptx
Lokakarya tentang Kepemimpinan Sekolah 1.pptx
 
MODUL AJAR MATEMATIKA KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR MATEMATIKA KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 5 KURIKULUM MERDEKA.pdf
 
Obat pada masa kehamilan: uteretonik dan tokolitik
Obat pada masa kehamilan: uteretonik dan tokolitikObat pada masa kehamilan: uteretonik dan tokolitik
Obat pada masa kehamilan: uteretonik dan tokolitik
 
Analisis Regresi Analisis Regresi dan Korelasi.ppt
Analisis Regresi Analisis Regresi dan Korelasi.pptAnalisis Regresi Analisis Regresi dan Korelasi.ppt
Analisis Regresi Analisis Regresi dan Korelasi.ppt
 
P5 Gaya Hidup berkelanjutan gaya hidup b
P5 Gaya Hidup berkelanjutan gaya hidup bP5 Gaya Hidup berkelanjutan gaya hidup b
P5 Gaya Hidup berkelanjutan gaya hidup b
 
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdf
 
prinsip dasar kepramukaan dan metode kepramukaan
prinsip dasar kepramukaan dan metode kepramukaanprinsip dasar kepramukaan dan metode kepramukaan
prinsip dasar kepramukaan dan metode kepramukaan
 
MODUL AJAR SENI TARI KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI TARI KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR SENI TARI KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI TARI KELAS 5 KURIKULUM MERDEKA.pdf
 
Materi: Mengapa tidak memanfaatkan Media ?
Materi: Mengapa tidak memanfaatkan Media ?Materi: Mengapa tidak memanfaatkan Media ?
Materi: Mengapa tidak memanfaatkan Media ?
 
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdfMODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdf
 
METODE PENGEMBANGAN MORAL DAN NILAI-NILAI AGAMA.pptx
METODE PENGEMBANGAN MORAL DAN NILAI-NILAI AGAMA.pptxMETODE PENGEMBANGAN MORAL DAN NILAI-NILAI AGAMA.pptx
METODE PENGEMBANGAN MORAL DAN NILAI-NILAI AGAMA.pptx
 
Aksi Nyata Cegah Perundungan Mulai dari Kelas [Guru].pptx
Aksi Nyata Cegah Perundungan Mulai dari Kelas [Guru].pptxAksi Nyata Cegah Perundungan Mulai dari Kelas [Guru].pptx
Aksi Nyata Cegah Perundungan Mulai dari Kelas [Guru].pptx
 
MODUL AJAR PENDIDIKAN AGAMA ISLAM & BUDI PEKERTI (PAIBP) KELAS 5.pdf
MODUL AJAR PENDIDIKAN AGAMA ISLAM & BUDI PEKERTI (PAIBP) KELAS 5.pdfMODUL AJAR PENDIDIKAN AGAMA ISLAM & BUDI PEKERTI (PAIBP) KELAS 5.pdf
MODUL AJAR PENDIDIKAN AGAMA ISLAM & BUDI PEKERTI (PAIBP) KELAS 5.pdf
 
UAS Matematika kelas IX 2024 HK_2024.pdf
UAS Matematika kelas IX 2024 HK_2024.pdfUAS Matematika kelas IX 2024 HK_2024.pdf
UAS Matematika kelas IX 2024 HK_2024.pdf
 
MODUL AJAR PENDIDIKAN PANCASILA KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR PENDIDIKAN PANCASILA KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR PENDIDIKAN PANCASILA KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR PENDIDIKAN PANCASILA KELAS 5 KURIKULUM MERDEKA.pdf
 

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...
 

Cute Pastel Interface Style for Coding ^0 Programming Learning Center by Slidesgo.pptx

  • 2. ANGGOTA : KELOMPOK 2C INFORMATIKA KELAS C MUHAMMAD YUSRIL FAUZI : 227006067 MUKHLIS HANAFI : 227006070 RAMZI SAPUTRA : 227006089 RIZKY MOCHAMMAD GANI : 227006076
  • 3. Prosedur adalah serangkaian statement yang digunakan untuk memecahkan sebuah masalah. Prosedur memiliki nama dan parameter. Prosedur harus dideklarasikan terlebih dahulu sebelum dipanggil atau digunakan. PASCAL 1.DEFINISI PROSEDUR
  • 4. Fungsi adalah sebuah deklarasi yang digunakan untuk menghitung sebuah nilai berdasar satu atau beberapa nilai masukan. Dalam Pascal, fungsi akan membantu mewujudkan pemecahan masalah yang lebih sederhana, sehingga program semakin mudah dibaca dan lebih mudah diubah atau dimodifikasi. 2.DEFINISI FUNGSI PASCAL
  • 5. 3.KONSEP TEORI PROSEDUR Konsep Teori Prosedur pada Pascal adalah sebagai berikut: Procedure nama-prosedur (parameter input ; var parameter output); begin {statemen implementasi prosedur (badan prosedur), hasil perhitungan yang dilakukan prosedur (jika ada), disimpan pada parameter output} end;
  • 6. Function nama-fungsi (parameter) : tipe- hasil; begin {statemen-statemen implementasi fungsi} Nama-fungsi := nilai yang dikirimkan/hasil end; 4.KONSEP TEORI FUNGSI
  • 7. Function nama-fungsi (parameter) : tipe- hasil; begin {statemen-statemen implementasi fungsi} Nama-fungsi := nilai yang dikirimkan/hasil end; 4.KONSEP TEORI FUNGSI
  • 8. 5.CONTOH PENGIMPLEMENTASIAN PROCEDURE PADA PASCAL 1.program contoh_1 var a, b, c : integer; procedure maxsimum; var max : integer; begin if (a > b) then max := c if (c > max) then max := c; writeln (max); end; begin readln (a,b,c); maksimum; end. 2.program contoh_2 var p, l, t, vol, panjang : real; procedure kotak; var v, pl : real; begin v := p * l * t; pl := p + 2.0 * t; writeln (v, pl); end; begin writeln(‘panjang’:10, ‘lebar’ :10,‘tinggi’:10); readln (p, l, t); kotak; end.
  • 9. 6.CONTOH PENGIMPLEMENTASIAN fungsi PADA PASCAL 1. program terbesar; var angka1, angka2 : integer; terbesar : integer; function maks (a,b : integer) : integer; begin if (a > b) then maks := a; else maks := b; end; begin write (‘angka pertama = ’); readln (angka1); write (‘angka kedua = ’); readln (angka2); terbesar := maks (angka1,angka2)’; write (‘angka terbesar adalah’,terbesar); end. 2. PROGRAM kurs_uang; var rupiah, kursdolar : integer; dolar : real; function nilaidolar (rp,kurs : integer) : real; begin nilaidolar := rp/kurs; end; begin write (‘masukan nilai rupiah = ’); readln (rupiah); write (‘kurs 1 dolar = ’); readln (kursdolar); dolar := nilaidolar (rupiah,kursdolar); write (‘Rp’ , rupiah , ‘=’ , dolar:3:2 , ‘dolar’); end.
  • 10. 7.kesimpulan D a r i p e m b a h a s a n d i a t a s d a p a t d i s i m p u l k a n b a h w a P a s c a l m e m e l i k i b e b e r a p a j e n i s d e k l a r a s i , d i a n t a r a n y a a d a P r o s e d u r d a n F u n g s i , P r o s e d u r m e r u p a k a n s e r a n g k a i a n s t a t e m e n t y a n g d i g u n a k a n u n t u k m e m e c a h k a n s e b u a h m a s a l a h s e d a n g k a n F u n g s i a d a l a h s e b u a h d e k l a r a s i y a n g d i g u n a k a n u n t u k m e n g h i t u n g s e b u a h n i l a i b e r d a s a r k a n s a t u a t a u b e b e r a p a n i l a i m a s u k a n .