Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string product, town;
- double quantity;
- cin >> product >> town >> quantity;
- if (town == "Sofia")
- {
- if (product == "coffee") cout << quantity * 0.5 << endl;
- else if (product == "water") cout << quantity * 0.8 << endl;
- // TODO: Check the other products ...
- }
- if (town == "Varna")
- {
- if (product == "coffee") cout << quantity * 0.45 << endl;
- else if (product == "water") cout << quantity * 0.7 << endl;
- // TODO: Check the other products ...
- }
- if (town == "Plovdiv")
- {
- if (product == "coffee") cout << quantity * 0.4 << endl;
- else if (product == "water") cout << quantity * 0.7 << endl;
- // TODO: Check the other products ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement