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
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://www.scribd.com/document/418813521/Materi-Praktikum-5-Program-Kontrol", "fetch_time": 1571080838000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2019-43/segments/1570986654086.1/warc/CC-MAIN-20191014173924-20191014201424-00042.warc.gz", "warc_record_offset": 1083697082, "warc_record_length": 61619, "token_count": 937, "char_count": 2658, "score": 3.84375, "int_score": 4, "crawl": "CC-MAIN-2019-43", "snapshot_type": "latest", "language": "en", "language_score": 0.5779366493225098, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00029-of-00064.parquet"}