Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pemrograman VisualMinggu …4… Page 1 MINGGU Ke Empat Pemrograman Visual Pokok Bahasan: Control Statement I Tujuan Instruksional Khusus: Mahasiswa dapat.

Similar presentations


Presentation on theme: "Pemrograman VisualMinggu …4… Page 1 MINGGU Ke Empat Pemrograman Visual Pokok Bahasan: Control Statement I Tujuan Instruksional Khusus: Mahasiswa dapat."— Presentation transcript:

1

2 Pemrograman VisualMinggu …4… Page 1 MINGGU Ke Empat Pemrograman Visual Pokok Bahasan: Control Statement I Tujuan Instruksional Khusus: Mahasiswa dapat menjelaskan dan mengaplikasikan konsep control statement I pada Visual Basic 2008 Referensi: Deitel Deitel, Visual Basic 2008 (2009), How to Program, Prentice Hall. Chapter 5

3 Pemrograman VisualMinggu …4… Page 2 Agenda If … Then Selection Statement If … Then … Else Selection Statement While Repetition Statement Do While … Loop Repetition Statement Do Until … Loop Repetition Statement Compound Assignment Operators Nested Control Statement Nested Repetition Statement

4 Pemrograman VisualMinggu …4… Page 3 If/Then Selection Structure grade>=60 Console.writeLine(“Passed”) If studentGrade>=60 Then Console.WriteLine(“Passed”) End If True False

5 Pemrograman VisualMinggu …4… Page 4 If/Then/Else Selection Structure grade>=60 Console.writeLine(“P assed”) If studentGrade>=60 Then Console.WriteLine(“Passed”) Else Console.WriteLine(“Failed”) End If Console.writeLine(“ Failed) TrueFalse

6 Pemrograman VisualMinggu …4… Page 5 While Repetition Structure Product<=1000 Product=Product*2 Dim Product as Integer=2 While Product<=1000 Console.Write(“{0}”, Product) Product=Product*2 End While True False

7 Pemrograman VisualMinggu …4… Page 6 Do While/Loop Repetition Structure Product<=1000 Product=Product*2 Dim Product as Integer=2 Do While Product<=1000 Console.Write(“{0}”, Product) Product=Product*2 End While True False

8 Pemrograman VisualMinggu …4… Page 7 Do Until/Loop Repetition Structure Product > 1000 Product=Product*2 Dim Product as Integer=2 Do Until Product > 1000 Console.Write(“{0}”, Product) Product=Product*2 End While False True

9 Pemrograman VisualMinggu …4… Page 8 Demo While Statement

10 Pemrograman VisualMinggu …4… Page 9 Demo Do While

11 Pemrograman VisualMinggu …4… Page 10 Demo Do Until

12 Pemrograman VisualMinggu …4… Page 11 Compound Assignment Operator Visual Basic provides the compound assignment operator for abbreviating assignment statements eq. +=, -=, *=, /=, \=, ^= and &=

13 Pemrograman VisualMinggu …4… Page 12 Nested Control Statement

14 Pemrograman VisualMinggu …4… Page 13 Test Program for Class Analysis

15 Pemrograman VisualMinggu …4… Page 14 Nested Repetition Statement

16 Pemrograman VisualMinggu …4… Page 15 Questions & Answers

17 Pemrograman VisualMinggu …4… Page 16 Thank You


Download ppt "Pemrograman VisualMinggu …4… Page 1 MINGGU Ke Empat Pemrograman Visual Pokok Bahasan: Control Statement I Tujuan Instruksional Khusus: Mahasiswa dapat."

Similar presentations


Ads by Google