UAS PEMROGRAMAN BERORIENTASI OBJEK

1 buatlah program dengan tampilan sbb;

===========================================
Masukan Nama barang :
Masukan Kode barang :
Masukan Jumlah barang :
Masukan Harga barang :

Proses :
Total = harga x jumlah barang

Output yang diinginkan :

===========================================
DAFTAR PENJUALAN TOKO LARIS CIKARANG
Nama Barang :
KOde Barang :
Jumlah Barang :
Harga Barang :
Jumlah Pembayaran :
============================================

/*AYOO BELAJAR JANGAN CUMAN BISA NYA NYONTEK MALU DONK*/
#include
#include
main()
{
char kd[5],nm[20];
int hrg,jml,byr;
clrscr();
/*program input*/
gotoxy(15,1);cout<>nm;
gotoxy(15,2);cout<>kd;
gotoxy(15,3);cout<>jml;
gotoxy(15,4);cout<>hrg;
byr=hrg*jml;
clrscr();
/*program output*/
gotoxy(15,6);cout<<"DAFTAR PENJUALAN TOKO LARIS CIKARANG"<<endl;
gotoxy(15,7);cout<<"————————–"<<endl;
gotoxy(15,8);cout<<"Nama Barang :"<<nm<<endl;
gotoxy(15,9);cout<<"Kode Barang :"<<kd<<endl;
gotoxy(15,10);cout<<"Jumlah Barang :"<<jml<<endl;
gotoxy(15,11);cout<<"Harga Barang :"<<hrg<<endl;
gotoxy(15,12);cout<<"Jumlah Pembayaran :"<<byr<<endl;
gotoxy(15,13);cout<<"————————–"<<endl;
gotoxy(15,14);cout<<" *** Terima kasih ***"<<endl;
getch();
}

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: