Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- double racketPrice;
- cin >> racketPrice;
- int racketCount, sneakersCount;
- cin >> racketCount >> sneakersCount;
- double racketsSum = racketPrice * racketCount;
- double sneackersSum = racketPrice / 6 * sneakersCount;
- double price = (racketsSum + sneackersSum) * 1.2;
- cout << "Price to be paid by Djokovic " << floor(price / 8) << endl;
- cout << "Price to be paid by sponsors " << ceil(price * 7 / 8) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement