You are on page 1of 16

# DOA

SEBELUM BELAJAR

“Kami ridho Allah SWT sebagai Tuhanku, Islam sebagai agamaku, dan
Nabi Muhammad sebagai Nabi dan Rasul, Ya Allah, tambahkanlah
kepadaku ilmu dan berikanlah aku kefahaman”
Ekspresi Konditional
Dasar Pemograman
Learning Outcomes

program kontrol
Pesan hari ini

## “Karena sesungguhnya sesudah kesulitan itu ada kemudahan.” (QS.

Alam Nasyroh: 5)
int A = 10, B = 20;
Operator Description Example
== Checks if the values of two operands are equal or not. If yes, (A == B) is not true.
then the condition becomes true.

!= Checks if the values of two operands are equal or not. If the (A != B) is true.
values are not equal, then the condition becomes true.

> Checks if the value of left operand is greater than the value (A > B) is not true.
of right operand. If yes, then the condition becomes true.

< Checks if the value of left operand is less than the value of (A < B) is true.
right operand. If yes, then the condition becomes true.

>= Checks if the value of left operand is greater than or equal (A >= B) is not true.
to the value of right operand. If yes, then the condition
becomes true.

<= Checks if the value of left operand is less than or equal to (A <= B) is true.
the value of right operand. If yes, then the condition
becomes true.
int A = 0, B = 1;

## && Called Logical AND operator. If both the (A && B) is false.

operands are non-zero, then the condition
becomes true.

## || Called Logical OR Operator. If any of the (A || B) is true.

two operands is non-zero, then the
condition becomes true.

## ! Called Logical NOT Operator. It is used to !(A && B) is true.

reverse the logical state of its operand. If a
condition is true, then Logical NOT
operator will make it false.
while

terbatas
while

Tak terbatas
while

Tak terbatas

Dengan break
for

terbatas
for

Tak terbatas
Tugas

## 1. Ubah while tak terbatas dengan menggunakan do while

Tugas Batas Minggu Depan

## Diperlukan aplikasi untuk pengenalan tipe segitiga. Tipe segitiga yang

1. Segitiga sama sisi
2. Segitiga sama kaki
3. Segitiga sembarang
4. Input salah beserta keterangan nya
5. Bila input salah aplikasi bisa mengindetifikasikan jenis bentuk
geometri lainnya

## Buatlah aplikasi tersebut

Referensi

http://www.cplusplus.com
DOA SESUDAH BELAJAR

‫اﻟر ْﺣ َﻣ ِن اﻟ ﱠر ِﺣ ِﯾم‬
‫ ﱠ‬.‫ا‬ِ ‫ﺳ ِم ﱠ‬
ْ ِ‫ﺑ‬

## ْ ‫ﺎط ًﻼ َو ْار ُز ْﻗﻧَ ﺎ‬

ُ‫اﺟﺗِﻧَﺎﺑَﮫ‬ ِ ‫ﺎ َو ْارز ُْﻗﻧَﺎ ا ِﺗ ّـﺑَﺎﻋَﮫ ُ َوأ َ ِرﻧَ ﺎ ا ﻟْ َﺑ‬B‫ق َﺣﻘ‬
ِ َ‫ﺎط َل ﺑ‬ ‫اَﻟﻠﱠ ُﮭ ﱠم أ َ ِر َﻧﺎ اﻟْ َﺣ ﱠ‬

## Ya Allah, Tunjukkanlah kepada kami kebenaran sehinggga kami dapat

mengikutinya Dan tunjukkanlah kepada kami kejelekan sehingga kami
dapat menjauhinya