Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. #include<Y:\vcpp\header.h>
  2. void main()
  3. {
  4. string naam,adres,gemeente;
  5. float eenhprijs,totaal,korting,btwbedr,mvh,aantal,tebet;
  6. char geslacht,type;
  7. bool school,recht_op_korting,vrouw;
  8.  
  9. titelscherm("Factuur");
  10. cout<<"Geef je naam in: ";
  11. cin>>naam;
  12. cout<<"Geef je adres in: ";
  13. cin>>adres;
  14. cout<<"geef de gemeente in: ";
  15. cin>>gemeente;
  16. cout<<"Geef je geslacht in: ";
  17. cin>>geslacht;
  18. cout<<"Welke type klant ben je (s=school, b=bedrijf): ";
  19. cin>>type;
  20. cout<<"Hoeveel Cd's wenst u te kopen: ";
  21. cin>>aantal;
  22. cout<<"Geef de eenheidsprijs van de cd's: ";
  23. cin>>eenhprijs;
  24.  
  25. bool school=vrouw=='v';
  26. bool school=type=='s';
  27. if (school)
  28. bool recht_op_korting=type==aantal>800;
  29. else
  30. bool recht_op_korting=type==aantal>1000;
  31. if(school)
  32. {
  33. if(recht_op_korting)
  34. korting=(eenhprijs*aantal)*0.07;
  35. else
  36. korting=0;
  37. else
  38. {
  39. if(recht_op_korting)
  40. korting=(eenhprijs*aantal)*0.05;
  41. else
  42. korting=0;
  43. }
  44. }
  45. totaal=eenhprijs*aantal;
  46. mvh=totaal-korting;
  47. btwbedr=mvh*0.21;
  48. tebet=mvh+btwbedr;
  49.  
  50. titelscherm("Factuur");
  51.  
  52. cout<<geslacht<<naam<<endl;
  53. cout<<"Adres: "<<adres<<endl;
  54. cout<<"Woonplaats: "<<gemeente<<endl;
  55. cout<<"Type klant: "<<type<<endl;
  56. cout<<"Aantal cd's: "<<aantal<<endl;
  57. cout<<"Eenheidsprijs: "<<eenhprijs<<" euro/cd."<<endl;
  58. cout<<"Totaal: "<<totaal<<" euro"<<endl;
  59. cout<<"Korting: "<<korting<<" euro"<<endl;
  60. cout<<"MVH: "<<mvh<<" euro"<<endl;
  61. cout<<"BTW-bedrag: "<<btwbedr<<" euro"<<endl;
  62. cout<<"Te betalen: "<<tebet<<" euro"<<endl;
  63. _getch();
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement