Brancing (Percabangan)

Fungsi Percabangan C++

IF….Else

If (kondisi)
perintah-1;
else
perintah-2;

SWITCH-CASE
Switch(ekspresi integer atau karakter)
{
case konstanta-1:
perintah-1;
break;
case konstanta-2:
perintah-2;
break;
………….
default:
perintah-n;
break;
}

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s