Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<Y:\vcpp\header.h>
- void main()
- {
- string naam,adres,gemeente;
- float eenhprijs,totaal,korting,btwbedr,mvh,aantal,tebet;
- char geslacht,type;
- bool school,recht_op_korting,vrouw;
- titelscherm("Factuur");
- cout<<"Geef je naam in: ";
- cin>>naam;
- cout<<"Geef je adres in: ";
- cin>>adres;
- cout<<"geef de gemeente in: ";
- cin>>gemeente;
- cout<<"Geef je geslacht in: ";
- cin>>geslacht;
- cout<<"Welke type klant ben je (s=school, b=bedrijf): ";
- cin>>type;
- cout<<"Hoeveel Cd's wenst u te kopen: ";
- cin>>aantal;
- cout<<"Geef de eenheidsprijs van de cd's: ";
- cin>>eenhprijs;
- bool school=vrouw=='v';
- bool school=type=='s';
- if (school)
- bool recht_op_korting=type==aantal>800;
- else
- bool recht_op_korting=type==aantal>1000;
- if(school)
- {
- if(recht_op_korting)
- korting=(eenhprijs*aantal)*0.07;
- else
- korting=0;
- else
- {
- if(recht_op_korting)
- korting=(eenhprijs*aantal)*0.05;
- else
- korting=0;
- }
- }
- totaal=eenhprijs*aantal;
- mvh=totaal-korting;
- btwbedr=mvh*0.21;
- tebet=mvh+btwbedr;
- titelscherm("Factuur");
- cout<<geslacht<<naam<<endl;
- cout<<"Adres: "<<adres<<endl;
- cout<<"Woonplaats: "<<gemeente<<endl;
- cout<<"Type klant: "<<type<<endl;
- cout<<"Aantal cd's: "<<aantal<<endl;
- cout<<"Eenheidsprijs: "<<eenhprijs<<" euro/cd."<<endl;
- cout<<"Totaal: "<<totaal<<" euro"<<endl;
- cout<<"Korting: "<<korting<<" euro"<<endl;
- cout<<"MVH: "<<mvh<<" euro"<<endl;
- cout<<"BTW-bedrag: "<<btwbedr<<" euro"<<endl;
- cout<<"Te betalen: "<<tebet<<" euro"<<endl;
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement