Paper class for Pemrograman II

source code c++

a = 2
a = 4
a = 6
b = 4
b = 2
b = 0

//—————————————————
#pragma hdrstop
#include < iostream.h >
#include < conio.h >

//—————————————————
#pragma argsused
int main ( int argc, char* argv[] )
{
int a=2, b=4;
for ( int i=1; i<=6; i++ )
{
if ( i>3 )
{cout<<”b = “ << b << endl ;
b=b-2 ;
}
else
{cout<<”a = “ << a << endl ;
a=a+2 ;
}
}
getch();
return 0;
}

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

%d blogger menyukai ini: