Kondisi dan Perulangan

Slides:



Advertisements
Similar presentations
Integrated Business Applications with Databases (D3) Jenny Pedler
Advertisements

Test practice Multiplication. Multiplication 9x2.
Object Oriented Programming A programming concept which views programs as objects with properties and ways to manipulate the object and the properties.
Pemrograman VisualMinggu …5… Page 1 MINGGU Ke Lima Pemrograman Visual Pokok Bahasan: Control Statement II Tujuan Instruksional Khusus: Mahasiswa dapat.
Lesson 5 - Decision Structure By: Dan Lunney
Pascal Programming Today Chapter 4 1 »Conditional statements allow the execution of one of a number of possible operations. »Conditional statements include:
Selection Logic Building decision-making into programs.
Decision making in VBA. Current Event Occurs: When a form is opened When the focus leaves one record and moves to another Before the first or next record.
IS437: Fall 2004 Instructor: Dr. Boris Jukic Program Flow Control: Decisions and Conditions (Branching) Controlled Repetition (Looping)
Compunet Corporation1 Programming with Visual Basic.NET Selection Structure If-Else Week 4 Tariq Ibn Aziz.
Slide 1 VB Program Flow Control. Slide 2 Making Decisions v Decision Statement: control the execution of parts of the program based on conditions. v The.
Slide 1 Forms v Parts of a form v Form: Program User Interface v Controls are contained inside forms v Control event handlers are contained inside forms.
Announcements Quiz 1 Posted on blackboard Handed Back (and Gone Over)Next Monday “Only a Quiz” Counts 5% of Final Grade Exam 1 Counts 10%
Nested Loops. For i = 1 To 5 For j = 1 To 6 picOutput.Print "*"; Next j picOutput.Print Next i.
1 Pertemuan 05 Selection Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Introduction to Active Server Pages
BACS 287 Programming Fundamentals 3. BACS 287 Programming Fundamentals This lecture introduces the following decision control structure topics: – If-Then.
Control Structures: Getting Started Sequence and Selection also arithmetic operators, data types, logical operators.
Selection Structures ; String Functions. If…Then…Else If condition Then [instructions when the condition is true] [Else [instructions when the condition.
Microsoft Visual Basic 2008 CHAPTER FIVE Mobile Applications Using Decision Structures.
Processing Decisions Chapter 3. If…Then…Else… Statements If decSalesAmount > 1000 Then sngTaxRate =.05 Else sngTaxRate =.07 End If.
OF COURSE I DON'T LOOK BUSY... I DID IT RIGHT THE FIRST TIME
Chapter 7 Decision Making. Class 7: Decision Making Use the Boolean data type in decision-making statements Use If statements and Select Case statements.
Python – Making Decisions Lecture 02. Control Structures A program that only has one flow is useful but limited. We can use if statements to make these.
Lecture Set 5 Control Structures Part A - Decisions Structures.
1 CC111 Lec9 : Visual Basic Visual Basic (3) Lecture 9.
ENGR 112 Decision Structures.
Selection Structure If... Then.. Else Case. Selection Structure Use to make a decision or comparison and then, based on the result of that decision or.
CSCI 3327 Visual Basic Chapter 4: Control Statements in Visual Basic (Part 2) UTPA – Fall 2011 Part of the slides is from Dr. John Abraham’s previous.
Controlling Execution Programming Right from the Start with Visual Basic.NET 1/e 8.
1 Statements: Control Structure Issues (Chapters and 19 of Code Complete) Don Bagert CSSE 375, Rose-Hulman October 17, 2006.
Visual Basic Programming Making Decisions: Loops & Decision Structures ©Copyright by Ronald P. Kessler, Ph.D.
Introduction to VB.NET 2005 Dr. McDaniel IDS4704 Spring 2005.
CHAPTER FIVE Specifying Alternate Courses of Action: Selection Statements.
MULTIPLE ALTERNATIVES IF… THEN… ELSEIF SELECT CASE.
ASP-5-1 ASP Control Structures Colorado Technical University IT420 Tim Peterson.
Introduction to Matlab Module #4 Page 1 Introduction to Matlab Module #4 – Programming Topics 1.Programming Basics (fprintf, standard input) 2.Relational.
Access VBA Programming for Beginners - Class 4 - by Patrick Lasu
Visual Basic Programming I 56:150 Information System Design.
VBScript Conditional Statements. Conditional Statements Very often when you write code, you want to perform different actions for different decisions.
Control Your Application Sequence, Selection, and Repetition.
Microsoft Visual Basic 2005 CHAPTER 5 Mobile Applications Using Decision Structures.
CIVIL AND GEOMATIC ENGINEERING FT Okyere. CIV 257- COMPUTER PROGRAMMING Lecture 3.
1 Microsoft® Visual Basic®.NET Language # 2. 2 Flow-Control Statements If … End If Select Case … End Select For… Next Do … Loop Exit.
CSI 3125, Preliminaries, page 1 Control Statements.
Lesson thirteen Conditional Statement "if- else" ©
5.02B Decision Making Structure (part 2). Compound Boolean Expressions.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 11 So Many Paths … So Little Time.
Control Structure  What is control Structure?  Types of Controls  Use the control structure in VBScript.  Example Summery.
ME 142 Engineering Computation I Condition Statements.
 Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do.
Recursion and Branching By: Engr. Faisal ur Rehman CE-105T Spring 2007 By: Engr. Faisal ur Rehman CE-105T Spring 2007.
Kondisi dan Perulangan
Oracle Developer/2000.
Introduction to Programming Lecture 2
ITEC 2600 Introduction to Analytical Programming
Visual Basic 6 (VB6) Data Types, And Operators
OF COURSE I DON'T LOOK BUSY... I DID IT RIGHT THE FIRST TIME
Problem Solving and Control Statements: Part 2
4. Functions and Control Statements
IS 350 Decision-making.
Control Structures: Part 1
VBScript Session 4 Dani Vainstein.
Boolean Expressions and If statements
المحاضرة السادسة.
Visual Basic – Decision Statements
Problem Solving and Control Statements
Recapitulation of Lecture 8
Visual Basic Programming
Presentation transcript:

Kondisi dan Perulangan

If...Then...Else Statement (Visual Basic) Multiple-line syntax: If condition [ Then ] [ statements ] [ ElseIf elseifcondition [ Then ] [ elseifstatements ] ] [ Else [ elsestatements ] ] End If

If...Then...Else Statement (Visual Basic) Single-line syntax: If condition Then [ statements ] [ Else [ elsestatements ] ]

Select...Case Statement (Visual Basic) Select [ Case ] testexpression [ Case expressionlist [ statements ] ] [ Case Else [ elsestatements ] ] End Select

For...Next Statement (Visual Basic)

While...End While Statement (Visual Basic)