Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- string product;
- cin >> product;
- double cena;
- cin >> cena;
- int n;
- cin >> n;
- double danok = 0.18;
- for(int i = 0; i < n; i++) {
- string s;
- cin >> s;
- if(s == product) {
- danok = 0.05;
- }
- }
- cena += (cena * danok);
- printf("%.5lf", cena);
- return 0;
- }
- // NNNNNNNNaN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement