SlideShare a Scribd company logo
1 of 10
Structure
Perhatikan Gambar Ini…

                           Gimana Kalo
                           semua
                           Ayam
                           BERTELUR
                           bareng..
                           Bingung gak,
                           nandain ini
                           telurnya ayam
                           yang
                           mana…????
                           Sama ketika
                           komputer harus
                           mengEKSEKU
                           SI program
                           yang memiliki
                           variabel
Apa Ada yang ANEH…..????   dengan nama
                           sama…
Bagaimana dengan ini….???




                          Ada dua
                        variabel jum
                         dalam satu
                          program
Pengertian….
Structure (struktur) adalah kumpulan elemen-
  elemen data yang digabungkan menjadi satu
  kesatuan
 Bentuk Umum Structur :
 Cara akses :
Sekarang…..

Perhatikan Program yang
 sudah saya berikan….

 ADA PERTANYAAN…
Membuat lebih dari satu struct dalam
satu program…
Buat program menghitung durasi rental warnet, dengan
ketentuan perhitungannya: 30 detik = Rp. 130,-
Satuan waktu : jam : menit : detik
Langkah-langkah penyelesaian masalah :
 Analisa penyelesaian masalah :
  jika satuan waktu diinputkan manual, maka :
  1. membuat kelompok untuk inputan waktu :




2. Membuat kelompok untuk hasil konversi waktu
  menjadi satuan detik :
Buat program menghitung durasi rental warnet, dengan ketentuan
perhitungannya: 30 detik = Rp. 130,-
Satuan waktu : jam : menit : detik

 Membuat inisialisasi untuk struct waktu dan
  hasil_konversi_waktu
 Mendeklarasikan variabel :
   Menjumlahkan hasil konversi waktu
   Menghitung total biaya yang harus dibayar
 Menginputkan jam, menit dan detik (manual)
 Menghitung hasil konversi dan tampilkan hasil
  konversi
   Jam         detik (/jam * 3600)
   Menit       detik (/menit * 60)
   Detik       detik
Buat program menghitung durasi rental warnet, dengan
ketentuan perhitungannya: 30 detik = Rp. 130,-
Satuan waktu : jam : menit : detik

 Menghitung jumlah total hasil konversi


 Menghitung total biaya yang harus dibayar jika
  /30 detik = Rp. 130,-

 Menampilkan hasil

More Related Content

Featured

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
Kurio // The Social Media Age(ncy)
 

Featured (20)

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...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Structure

  • 2. Perhatikan Gambar Ini… Gimana Kalo semua Ayam BERTELUR bareng.. Bingung gak, nandain ini telurnya ayam yang mana…???? Sama ketika komputer harus mengEKSEKU SI program yang memiliki variabel Apa Ada yang ANEH…..???? dengan nama sama…
  • 3. Bagaimana dengan ini….??? Ada dua variabel jum dalam satu program
  • 4. Pengertian…. Structure (struktur) adalah kumpulan elemen- elemen data yang digabungkan menjadi satu kesatuan  Bentuk Umum Structur :
  • 6. Sekarang….. Perhatikan Program yang sudah saya berikan…. ADA PERTANYAAN…
  • 7. Membuat lebih dari satu struct dalam satu program…
  • 8. Buat program menghitung durasi rental warnet, dengan ketentuan perhitungannya: 30 detik = Rp. 130,- Satuan waktu : jam : menit : detik Langkah-langkah penyelesaian masalah :  Analisa penyelesaian masalah : jika satuan waktu diinputkan manual, maka : 1. membuat kelompok untuk inputan waktu : 2. Membuat kelompok untuk hasil konversi waktu menjadi satuan detik :
  • 9. Buat program menghitung durasi rental warnet, dengan ketentuan perhitungannya: 30 detik = Rp. 130,- Satuan waktu : jam : menit : detik  Membuat inisialisasi untuk struct waktu dan hasil_konversi_waktu  Mendeklarasikan variabel :  Menjumlahkan hasil konversi waktu  Menghitung total biaya yang harus dibayar  Menginputkan jam, menit dan detik (manual)  Menghitung hasil konversi dan tampilkan hasil konversi  Jam  detik (/jam * 3600)  Menit  detik (/menit * 60)  Detik  detik
  • 10. Buat program menghitung durasi rental warnet, dengan ketentuan perhitungannya: 30 detik = Rp. 130,- Satuan waktu : jam : menit : detik  Menghitung jumlah total hasil konversi  Menghitung total biaya yang harus dibayar jika /30 detik = Rp. 130,-  Menampilkan hasil