STRUKTUR KONTROL.

Slides:



Advertisements
Similar presentations
Soal-3 Susun program untuk menginput tiga (3) buah bilangan bulat (misal A, B dan C dimana ABCA), kemudian mencetak ketiga nilai tersebut urut dari.
Advertisements

Praktikum C Programming Perulangan / Loop. Bentuk Loop 1.Perintah for 2.Perintah while 3.Perintah do-while.
For(int i = 1; i
While, do while, break, continue Dr. Anto Satriyo Nugroho, M.Eng Web: Mata Kuliah: Dasar.
Rully Yulian MF MCAD,MCPD,MCT,MVP VB.NET Independent IT Trainer - Application Developer
LIST ITEM. List Style … Pop List Ditampilkan dalam bentuk field dengan tombol di sebelah kanan. Ketika tombol di klik maka sekumpulan data akan muncul.
Selamat Idul Fitri 1430 H Taqabalallahu minna waminkum Taqabbal ya karim… Mohon maaf lahir dan batin.
SELEKSI IF & CASE. if dengan 1 statement If skor > 8 then Nilai:=‘A’ IF dengan banyak statement If skor > 8 then Begin Nilai := ‘A’; Lulus :=True; Bonus.
Ir. I Nyoman Setiawan, MT VARIABEL ACAK DAN EKSPEKTASI (Random Variable and Expectation) 1. Sheldon M Ross, Introduction Probability and Statistics for.
Data Types Session 2.  Primitive data types  int, float, double, char  Aggregate data types  Arrays come.
Prosedur dan Fungsi.
Penyelesaian Sistem Pertidaksamaan Linear Dua Variabel
Algoritma Genetika ( 2 ).
By Asep Taufik Muharram. Data Definition Language (DDL) Digunakan untuk melakukan pembuatan struktur database, mulai dari mendefinisikan database, tabel-tabel.
Pertemuan 3 Array dkk jual [Valdo] Lunatik Chubby Stylus.
S T A C K Catatan Kuliah: Algoritma & Struktur Data Ari Cahyono, S.Si., M.T.
Pertemuan : 6 Basis Data Terapan
Loops – While Loop Repetition Statements While Reading for this Lecture, L&L, 5.5.
CS150 Introduction to Computer Science 1
Intro to Java while loops pseudocode. 1 A “Loop” A simple but powerful mechanism for “making lots of things happen!” Performs a statement (or block) over.
1 10/9/06CS150 Introduction to Computer Science 1 for Loops.
Latihan soal Pertemuan 3 s.d 4
Analisis Hubungan (KORELASI) J0682
Representasi Bilangan(tambahan). Konversi desimal ke biner Bilangan desimal dikonversi ke biner dengan membagi bilangan tersebut dengan 2 kemudian diambil.
CIS 234: LOOPS Adapted from materials by Dr. Donald Bell, 2000 (updated April 2007)
Loops ISYS 350. A Box of Chocolate Repeat this process until box is empty: – Take one chocolate from the box – Eat the chocolate – Box has more chocolate?
October 28, 2015ICS102: For Loop1 The for-loop and Nested loops.
Loops ISYS 350. Compute the sum of a list of numbers: Example: 5, 2, 10, 8, 4 Process: Sum= 0 Get a number from the list Sum = Sum + the number Repeat.
ADMIT TICKET WHAT DOES THIS OUTPUT? double y = 2.5; int x = 6 / (int) y; System.out.println(“x = “ + x);
Introduction to Computing Concepts Note Set 15. JOptionPane.showMessageDialog Message Dialog Allows you to give a brief message to the user Can be used.
Loops ISYS 350. Two Types of Loops while loop for loop.
PENDAHULUAN Dalam matematika, deret Taylor adalah representasi fungsi matematika sebagai jumlahan tak hingga dari suku-suku yang nilainya dihitung dari.
AP CS. Enhanced for loop for(object type, declared object) This loop is not necessarily iterative. It is ideal to traverse array arrays and array lists.
Loops ISYS 350. Two Types of Loops while loop for loop.
Looping I (while statement). CSCE 1062 Outline  Looping/repetition construct  while statement (section 5.1)
Part 2 Variabel & Data types
PUNGSI KEANGGOTAAN.
by: Muhammad Zidny Naf’an;
Pernyataan Kawalan Java
Oracle Developer/2000.
Variabel Dan Tipe data
Dasar Komputer & Pemrograman 2B
Pertemuan 1&2 - Dasar Pemrograman PHP
OPERASI HITUNG BILANGAN
LOGARITMA Kelompok 4 Odi oberoi Fikri Fauzan Iqlima faza hariny
pernyataan kontrol pengulangan - lanjutan -
BAB INHERITANCE (Pewarisan)
VARIABEL ACAK DAN EKSPEKTASI (Random Variable and Expectation)
Pertemuan 7 I/O Multiplexing
Variabel Dan Tipe data
FAJAR Y. ZEBUA Pertemuan iv NAVIGASI PADA WEBSITE FAJAR Y. ZEBUA
Dasar-Dasar Pemrograman
DATA MANIPULATION LANGUAGE
Bab 5 Distribusi Normal © 2002 Prentice-Hall, Inc.
SISTEM DIGITAL ALJABAR LOGIKA
KOMPETENSI DASAR 3.2 Menerapkan prinsip-prinsip pengukuran besaran fisis, ketepatan, ketelitian, dan angka penting, serta notasi ilmiah.
الحلقات التكرارية وجمل الدوران (loops)
2.0 PENGALAMATAN RANGKAIAN
A.ERROR Kesalahan adalah perbedaan antara variabel yang diukur dan setpoint. Kesalahan dapat berupa positif atau negatif. Tujuan dari setiap skema kontrol.
Pemrograman WEB I Pertemuan 5.
PSPICE dalam SEE 1003 Berasal dari SPICE – Simulation Program with Integrated Circuit Emphasis – dibina di University of California at Berkeley Pada asalnya,
Pemrograman mesin bubut CNC OLEH: DR. B. SENTOT WIJANARKA, M.T.
Jenis – jenis Penelitian. Jenis – jenis penelitian dapat dikelompokkan menurut : tujuan, pendekatan, tingkat eksplanasi & jenis data. TujuanPendekatanTingkat.
PROGRAM FLOWCHART Iteration Statements.
Learning Plan 4 Looping.
Types of loops definite loop: A loop that executes a known number of times. Examples: Repeat these statements 10 times. Repeat these statements k times.
Pemrograman Bilangan Bulat (Integer Programming) Sebuah program linear dengan persyaratan tambahan bahwa semua variabelnya merupakan bilangan bulat Algoritma.
1. Operasi Penjumlahan Dimana: a, b dan c bilangan bulat. Contoh: = Operasi Pengurangan Dimana: a, b dan c bilangan bulat. Contoh: 10 –
Presentation transcript:

STRUKTUR KONTROL

Struktur Kontrol Perulangan

for loop { statement1; statement2; . . . } for (InitializationExpression; LoopCondition; StepExpression) { statement1; statement2; . . . } InitializationExpression : inisialisasi dari variabel loop. LoopCondition : membandingkan variabel loop pada nilai batas. StepExpression : melakukan update pada variabel loop.

contoh dari for loop int i; for( i = 0; i < 10; i++ ) { System.out.print(i); }

while loop while( boolean_expression ) { statement1; statement2; . . . }

Contoh int i = 4; while ( i > 0 ) { System.out.print(i); i--; }

do-while loop do { statement1; statement2; . . . }while( boolean_expression );

Contoh int x = 0; do { System.out.println(x); x++; }while (x<10);

LATIHAN Buat program untuk menampilkan bilangan ganjil positif antara 1 s/d n. Dimana n input dari user