Photobucket Photobucket Photobucket

Wednesday, November 2, 2011

Tugas Borland dia

#include<stdio.h>
#include<iostream.h>
#include<conio.h>
main()
{
char nabar[20],nofak[25];
int jubel,ubay,habar;
float tobay,kembali;
cout<<"INPUT DATA PENJUALAN"<<endl;
cout<<"********************"<<endl;
cout<<"No.faktur          :";cin>>nofak;
cout<<"Nama Barang        :";gets(nabar);
cout<<"Harga Barang       :";cin>>habar;
cout<<"Jumlah Beli        :";cin>>jubel;
cout<<endl<<endl;
cout<<"  Nota  Penjualan   "<<endl;
cout<<"No.faktur          :"<<nofak<<endl;
cout<<"==================="<<endl;
tobay=habar*jubel;
cout<<"Nama Barang        :"<<nabar<<endl;
cout<<"Harga Barang       :"<<habar<<endl;
cout<<"Jumlah Beli        :"<<jubel<<endl;
printf("Total Bayar       =%0.2f  ",tobay);
cout<<endl;
cout<<"Uang Bayar         :";cin>>ubay;
cout<<endl;
kembali=ubay-tobay;
printf("Kembali           =%0.2f       ",kembali);
getch();
}

0 comments:

Post a Comment