Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <math.h>
- using namespace std;
- int main()
- {
- double priceOneTennisRacket;
- int numberTennisRacket, numberShoes;
- cin >> priceOneTennisRacket >> numberTennisRacket >> numberShoes;
- double priceAllRackets = priceOneTennisRacket * numberTennisRacket;
- double priceShoes = priceOneTennisRacket / 6;
- double allShoes = priceShoes * numberShoes;
- double otherЕquipment = (allShoes + priceAllRackets) * 0.2;
- double totalPrice = priceAllRackets + allShoes + otherЕquipment;
- double priceForDjoko = totalPrice / 8;
- double priceForSponsor = (totalPrice * 7) / 8;
- cout << "Price to be paid by Djokovic " << floor(priceForDjoko) << endl;
- cout << "Price to be paid by sponsors " << ceil(priceForSponsor) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement