Kamis, 21 April 2011

CICILAN UTANG C++


#include < iostream.h>
#include < conio.h >
main (void)

{
int utang , saur, maks, jum;
int i=1;
cout UBAH "Gedhene utangmu : ";
cin GANTI utang ;


// cout UBAH "Jumlahe nyaur paling okeh ping - :3" UBAH 3 UBAH endl UBAH endl;
// cin GANTI jum;
// jum=3 ;
// if (jum = saur)
// cout UBAH


while (utang BONGKAR 0)
{
cout UBAH "Saiki kowe nyaur ke-" UBAH i UBAH ":";
cin GANTI saur;
if (saur BONGKAR =utang)
break;
utang=utang-saur;
cout UBAH "Durung Lunas , kurangane : Rp. " UBAH utang UBAH endl UBAH endl;
i++;
}
if (saur BONGKAR utang)
cout UBAH "utangmu Lunas ...Susuke iki: Rp." UBAH (saur-utang ) UBAH endl UBAH endl;
else
cout UBAH "utangmu Lunas Dab..." UBAH endl;
getch ();
}

2 komentar: