Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int count_of_photos;
- string type_of_photo;
- string type_of_order;
- cin >> count_of_photos
- >> type_of_photo
- >> type_of_order;
- double total_cost = 0.0;
- if (type_of_photo == "9X13")
- {
- total_cost = count_of_photos * 0.16;
- if (count_of_photos >= 50)
- {
- total_cost *= 0.95;
- }
- }
- else if (type_of_photo == "10X15")
- {
- total_cost = count_of_photos * 0.16;
- if (count_of_photos >= 80)
- {
- total_cost *= 0.97;
- }
- }
- else if (type_of_photo == "13X18")
- {
- total_cost = count_of_photos * 0.38;
- if (count_of_photos > 100)
- {
- total_cost *= 0.95;
- }
- else if (count_of_photos >= 50)
- {
- total_cost *= 0.97;
- }
- }
- else if (type_of_photo == "20X30")
- {
- total_cost = count_of_photos * 2.9;
- if (count_of_photos > 50)
- {
- total_cost *= 0.91;
- }
- else if (count_of_photos >= 10)
- {
- total_cost *= 0.93;
- }
- }
- if (type_of_order == "online")
- {
- total_cost *= 0.98;
- }
- cout << fixed << setprecision(2) << total_cost << "BGN" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement