Dasar Komputer & Pemrograman 2B

Slides:



Advertisements
Similar presentations
The Important Thing About By. The Important Thing About ******** The important thing about ***** is *****. It is true s/he can *****, *****, and *****.
Advertisements

While, do while, break, continue Dr. Anto Satriyo Nugroho, M.Eng Web: Mata Kuliah: Dasar.
Control Flow Statements: Repetition/Looping
Programming In C++ Spring Semester 2013 Lecture 3 Programming In C++, Lecture 3 By Umer Rana.
SUB PROGRAM PROCEDURE (SUB) dan FUNCTION
Standard Algorithms Find the highest number. ! Your name and today’s date ! Find the maximum Dim numbers(20) As Integer.
Control Structure There are two kind of control structure in GWBASIC one is iteration/loop or repetitive and second make decision/condition. Iteration/Loop.
A c i d s & B a s e s. A c i d - B a s e T h e o r i e s A r r h e n i u s B r o n s t e d - L o w r y L e w i s A r r h e n i u s B r o n s t e d - L.
Pemrograman VisualMinggu …5… Page 1 MINGGU Ke Lima Pemrograman Visual Pokok Bahasan: Control Statement II Tujuan Instruksional Khusus: Mahasiswa dapat.
PEMROGRAMAN TERSTRUKTUR Semester Genap Tahun 2011.
Pemrograman Dasar - Data Types1 OPERATOR. Pemrograman Dasar - Data Types2 Arithmetic operator  + - * /  / operator denotes integer division if both.
Pertemuan : 6 Basis Data Terapan
SQL Pertemuan 26. Range Operator ‘Between dan Not Between’
Dasar Pemrograman Devi Fitrianah, S.Kom., MTI Teknik Informatika-Fasilkom UMB SUB PROGRAM (Procedure / Function)
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Loops.
The Initial Visual Basic Screen
Handling Errors Introduction to Computing Science and Programming I.
1 Pertemuan 06 Repetition Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Arrays. What is the output of: Private Sub cmdButton_Click() Dim i As Integer, a(1 To 4) As integer Open "DATA.TXT" For Input As #1 For i = 1 To 4 Input.
Muffin Shop - if, calculations etc. (muffins, muffins2) Please use speaker notes for additional information!
IN THE NAME OF ALLAH UserForms on VBA Lab 06 Tahani Al_dweesh.
ARRAY PADA PASCAL DOSEN : NURAINI PURWANDARI.
Chapter 7 Code Tables. VB Code Box 7-1 Event Procedure for Compute Button Private Sub hsbExemptions_Change() txtExemptions.Text =Str(hsbExemptions.Value)
The Repetition Process in Visual Basic. The Repetition Process The capability to repeat one or more statements as many times as necessary is what really.
Array - adding to array at run time Please see speaker notes for additional information!
Do Loop with Interest Please see speaker notes for additional information!
New Project in Visual Basic Please use speaker notes for additional information!
Liang, Introduction to Programming with C++, Second Edition, (c) 2010 Pearson Education, Inc. All rights reserved Chapter 4 Loops.
Week 4.  Recap – Ranges  For Each Loops  Ranges Referencing Range Objects  Set (keyword)
Random Files Please see speaker notes for additional information!
CS105 Lab 9 – Do-While-Loops Announcements MP2 released today! See website for several important announcements/deadlines CS 105 – Fall
Delivery and other DO Examples Please use speaker notes for additional information!
I Power Higher Computing Software Development Development Languages and Environments.
Two Forms Please use speaker notes for additional information!
Repetition Structures
Conditional Loops CSIS 1595: Fundamentals of Programming and Problem Solving 1.
For Code Next For Code Next A loop is a segment of a code that repeats (changing slightly each time)
Visual Basic I/O Programs (ProjRead1, ProjRead2, ProjWrite1, ProjPay) Please use speaker notes for additional information!
CSC 162 Visual Basic I Programming. Repetition Structures Pretest Loop –Exit condition is tested before the body of code is executed Posttest Loop –Exit.
Repetition loops Is a condition true? START END OF LOOP EXIT.
CheckBox i Option Button. Private Sub Command1_Click() Check1 = 1 If Check1 = 1 Then Text1.FontBold = True Else Text1.FontBold = False End If Check2 =
Fourth Quarter.  Involves loops or cycles ◦ Loops: means that a process may be repeated as long as certain condition remains true or remains false. ◦
Repetition In today’s lesson we will look at: why you would want to repeat things in a program different ways of repeating things creating loops in Just.
Multiple forms - SDI & MDI Please use speaker notes for additional information!
Processing multiple files
INTEGERS By: NIKMATUL HUSNA.
OPERASI HITUNG BILANGAN
Chapter 2 Anonymous Block
Pemrograman WEB I Pertemuan 4.
STRUKTUR KONTROL.
Chapter 4 Repetition Statements (loops)
While Loop While Loop i := 0; x := 2; WHILE i < 100
Pemrograman Database Delphi & MySQL
JUDUL TOPIK atau SUB TOPIK
Dasar-Dasar Pemrograman
Chapter 5 Structures.
Department Array in Visual Basic
حلقات التكرار.
NOTASI SIGMA DAN POLA BILANGAN
WordPad мәтіндік редакторының қосымша мүмкіндіктері
SEMAFOR.
CheckBox i Option Button
Chapter 4 Loops Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved
Loops.
A LESSON IN LOOPING What is a loop?
OptionButton, CheckBox компоненттері
Osobine FORMA Name frmIgra Caption Igra Command1 Name cmdSmanji
Print the following triangle, using nested loops
GCSE Computing:: While Loops
Sub 範例 Sub F ( X ) MsgBox(X ^ 2 ) End Function
Presentation transcript:

Dasar Komputer & Pemrograman 2B Contoh-contoh Program

Program Hitung

tabel propeties

listing program Private Sub CmdKeluar_Click() End End Sub Private Sub HscNilai1_Change() TxtNilai1.Text = HscNilai1.Value Private Sub HscNilai2_Change() txtNilai2.Text = HscNilai2.Value

listing program cont.. Private Sub OptJumlah_Click() TxtHasil.Text = Val(TxtNilai1.Text) + Val(txtNilai2.Text) End Sub Private Sub OptKurang_Click() TxtHasil.Text = Val(TxtNilai1.Text) - Val(txtNilai2.Text) Private Sub OptKali_Click() TxtHasil.Text = Val(TxtNilai1.Text) * Val(txtNilai2.Text) Private Sub Optbagi_Click() TxtHasil.Text = Val(TxtNilai1.Text) / Val(txtNilai2.Text)

Program MENCETAK NAMA

tabel propeties

listing program Private Sub Cmdkeluar_Click() End End Sub Private Sub CmdCetak_Click() LblHasil.Caption = TxtHasil.Text TxtHasil.Text = ""

listing program cont.. Private Sub CheckBold_Click() LblHasil.FontBold = True End Sub Private Sub CheckItalic_Click() LblHasil.FontItalic = True  

listing program cont.. Private Sub OptBiru_Click() LblHasil.ForeColor = vbBlue End Sub   Private Sub optMerah_Click() LblHasil.ForeColor = vbRed

Program nilai tukar kurs

tabel propeties

listing program Private Sub CMDEXIT_Click() End End Sub   Private Sub CMDOK_Click() TxtRupiah.Text = TxtDolar.Text * TxtTukar.Text

Program nama bilangan

tabel propeties

listing program Private Sub cmdclear_Click() Cls End Sub   Private Sub cmdexit_Click() End

listing program cont.. Private Sub CmdBilanganAsli_Click() Print i = 1 Do Until i > 10 Print " Bilangan Asli ="; i i = i + 1 If i = 6 Then Exit Do End If Loop End Sub

listing program cont.. Private Sub cmdbilangangenap_Click() Print For i = 0 To 10 Step 2 Print " Bilangan Genap ="; i If i = 6 Then Exit For End If Next i End Sub

listing program cont.. Private Sub cmdbilanganganjil_Click() Print While i <= 10 Print " Bilangan Ganjil ="; i i = i + 2 Wend End Sub