Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Chapter 1-a FLOW CHART. BACKGROUND Program: composed by 1 programmer composed by 1 team of programmers Required planning & design using: FlowChart: “Symbols.

Presentasi serupa


Presentasi berjudul: "Chapter 1-a FLOW CHART. BACKGROUND Program: composed by 1 programmer composed by 1 team of programmers Required planning & design using: FlowChart: “Symbols."— Transcript presentasi:

1 Chapter 1-a FLOW CHART

2 BACKGROUND Program: composed by 1 programmer composed by 1 team of programmers Required planning & design using: FlowChart: “Symbols representing the flow of control steps of a program’s execution” Objective: to simplify program-code composition “FLOW CHART”

3 SYMBOLS IN FLOW CHART Symbol for presenting data/input or results/output Process flow/direction Symbol for result’s documentation (in hard copy) Symbol for reading data/input using punched cards. Symbol of a process or program statement Start and End of a program indication Connector Symbol for conditional statement where decision is based of whether the condition is true or false y n

4 TYPES OF INSTRUCTION Process A Process B Process C A. Unconditional Statements

5 TYPES OF INSTRUCTION B. Conditional Statement Condition Process AProcess B FalseTrue

6 TYPES OF INSTRUCTION C. Looping Statements Condition Process AProcess B FalseTrue

7 EXAMPLE: 1. Flow chart for buying cakes using coupons: Start Prepare Money Queue for buying coupon Buy the Coupon A Choose Cake Trade cake for coupon Stop A

8 EXAMPLE: 2. Flow Chart for Study: Start Prepare Equipments Read Notes Understand Notes A Do the Questions Match with Answers Stop A Understand Contents Fit? Take a break B B yes no

9 EXAMPLE: 3. Find the average of 3 input data numbers: Start X = A+B+C 3 Stop Read: A,B,C Write: X

10 PRACTICE QUESTIONS 1. Given: –A number of data –The amount of data depends on the number of inputs that may varies. –Solve for : The Average of all data 2. IF A is a negative number, add 3 to X IF Not, subtract 3 from X (Do it in Classroom…)

11 Answer 1: Start TTL = 0, CNT = 0 TTL = TTL / CNT WRITE CNT, TTL Stop CNT = CNT+ 1 End of Data Write: X yes No Read: X TTL = TTL + X

12 Answer 1: Start TTL = 0, CNT = 0 TTL = TTL / CNT WRITE CNT, TTL Stop CNT = CNT+ 1 Write: X yes No Read: X TTL = TTL + X X = 9999 ?

13 Answer 2: Start X = X + 3 A  0 ? Write: X yes no Read: A, X X = X - 3 Stop

14 Latihan Soal 1.Menampilkan bilangan 1 s/ 10 2.Menentukan apakah data yang dimasukkan adalah bilangan positif atau negatif 3.Menentukan apakah data yang dimasukkan adalah bilangan genap atau ganjil

15 Latihan soal 4. Tampilkan deret : -11, -9, -7, -5, -3, -1, 0, 2, 4, 6, 8, Tampilkan deret : -10, 8, -6, 4, -2, 0, 1, 4, 9, 16, Tampilkan deret : 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55

16 Soal latihan 1. Buatlah algoritma untuk menghasilkan deret : -10, 8, -6, 4, -2, 0, 1, 3, 6, 10, 15, Buatlah algoritma untuk menghasilkan deret : -13, 11, -9, 7, -5, 3, -1, 0, 1, 4, 9, 16, 25, 36, Buatlah algoritma untuk menghitung rata-rata, nilai maximum dan minimum dari nilai ujian Pengantar Teknik Komputer


Download ppt "Chapter 1-a FLOW CHART. BACKGROUND Program: composed by 1 programmer composed by 1 team of programmers Required planning & design using: FlowChart: “Symbols."

Presentasi serupa


Iklan oleh Google