#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<< "Menghitung Diskon";
gotoxy(3,3);cout<<"ID CUST";gotoxy(20,3);cout<<"= C05053";
gotoxy(3,4);cout<<"Barang yang Dibeli"; gotoxy(20,4);cout<<"=";
cin>>id;
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;
getch();
}
Rabu, 17 April 2013
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar