Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3.  
  4.  
  5. double a, b, c, d;
  6. int w=0;
  7. int i;
  8. char fam[256];
  9.  
  10.  
  11. int main() {
  12. SetConsoleCP(1251);
  13. SetConsoleOutputCP(1251);
  14. using namespace std;
  15. cout << "Введите ФИО покупателя: ";
  16. cin.getline(fam, 256, '\n');
  17. cout << "Введите сумму покупки: ";
  18. cin >> a;
  19. b = ((a / 100) * 6);
  20. c = a/10;
  21. d = a + b + c;
  22. system("pause");
  23. system("cls");
  24. cout << "\t" <<"\t"<<"\t"<< "НАКЛАДНАЯ" << "\n";
  25. for (i=57; i > w; w++)
  26. {
  27. cout << "_";
  28. };
  29. cout << endl<< endl;
  30. cout << " " << "ПОКУПАТЕЛЬ" << "\t" << "\t" << fam << endl;
  31. cout << " " << "Сумма заказа" << "\t" << "\t" << int(a * 100 + 0.5) / 100.0 << endl;
  32. cout << " " << "Налог" << "\t" << "\t" << "\t" << int(b * 100 + 0.5) / 100.0 << endl;
  33. cout << " " << "Транспортировка" << "\t" << int(c * 100 + 0.5) / 100.0 << endl;
  34. w = 0;
  35. for (i = 57; i > w; w++)
  36. {
  37. cout << "_";
  38. };
  39. cout << endl << endl;
  40. cout << " " << "Стоимость всего" << "\t" << int(d * 100 + 0.5) / 100.0 << endl;
  41. w = 0;
  42. for (i = 57; i > w; w++)
  43. {
  44. cout << "_";
  45. };
  46. cout << endl << endl;
  47. system("pause");
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement