Faisalrisa's Weblog

Just another WordPress.com weblog

Program Salah

leave a comment »

Contoh program salah di bawah ini memakai bahasa C++. Scriptnya adalah sebagai berikut :

—————————————————————————————-

#include <iostream>

using namespace std;

int main() {
int C;
for (C=0; C=10; C++) {
cout<<”Aduuuhh, capeekkkk. Kapan nih berhentinya………………………………………………”<<endl;
}

return 0;
}

—————————————————————————————-

Jika dieksekusi, maka hasilnya seperti screen capture di bawah ini

Seharusnya program ini akan berhenti setelah mengurut sebanyak 10 baris, tapi dibuat terus mengurut sampai jumlah tak hingga.

Advertisement

Written by faisalrisa

October 27, 2008 at 07:53

Posted in tugas security

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.