#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
char id[10], nama_barang1[30],nama_barang2[30],disc2[5];
double jumlah1, jumlah2, disc1;
double harga1, harga2, ppn, total_pembelian, total_beli1, total_beli2;
gotoxy(15,1);cout<< "Soal ke-tiga";
gotoxy(3,3);cout<<"ID CUST";gotoxy(20,3);cout<<":";
cin>>id;
gotoxy(3,4);cout<<"BARANG YANG DIBELI"; gotoxy(20,4);cout<<":";
gotoxy(3,5);cout<<"NAMA BARANG"; gotoxy(20,5);cout<<":";
cin>>nama_barang1;
gotoxy(3,6);cout<<"JUMLAH";gotoxy(25,6);cout<<"KARDUS";gotoxy(20,6);cout<<":";
cin>>jumlah1;
gotoxy(3,7);cout<<"HARGA"; gotoxy(20,7);cout<<":"<<"Rp.";
cin>>harga1;
gotoxy(3,8);cout<<"DISC"; gotoxy(24,8);cout<<"%"; gotoxy(20,8);cout<<":";
cin>>disc1;
gotoxy(3,9);cout<<"NAMA BARANG"; gotoxy(20,9);cout<<":";
cin>>nama_barang2;
gotoxy(3,10);cout<<"JUMLAH"; gotoxy(20,10);cout<<":";
cin>>jumlah2;
gotoxy(3,11);cout<<"HARGA"; gotoxy(20,11);cout<<":"<<"Rp.";
cin>>harga2;
gotoxy(3,12);cout<<"DISC"; gotoxy(20,12);cout<<":";
cin>>disc2;
total_beli1=(disc1/100)*(jumlah1*harga1);
total_beli2= jumlah2*harga2;
ppn=0.1*(total_beli1+total_beli2);
total_pembelian=(total_beli1+total_beli2)-ppn;
gotoxy(1,13);cout<<"PPN"; gotoxy(20,13);cout<<":"<<ppn;
gotoxy(1,14);cout<<"TOTAL PEMBELIAN"; gotoxy(20,14);cout<<":"<<total_pembelian;
gotoxy(25,17);cout<<"SELESAI.......";
getch();
}
Read more...