SHARE
TWEET

tennis

a guest Jan 13th, 2020 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cmath>
  3. #include <math.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     double priceOneTennisRacket;
  9.     int numberTennisRacket, numberShoes;
  10.  
  11.     cin >> priceOneTennisRacket >> numberTennisRacket >> numberShoes;
  12.  
  13.     double priceAllRackets = priceOneTennisRacket * numberTennisRacket;
  14.  
  15.     double priceShoes = priceOneTennisRacket / 6;
  16.     double allShoes = priceShoes * numberShoes;
  17.     double otherЕquipment = (allShoes + priceAllRackets) * 0.2;
  18.     double totalPrice = priceAllRackets + allShoes + otherЕquipment;
  19.     double priceForDjoko = totalPrice / 8;
  20.     double priceForSponsor = (totalPrice * 7) / 8;
  21.  
  22.     cout << "Price to be paid by Djokovic " << floor(priceForDjoko) << endl;
  23.     cout << "Price to be paid by sponsors " << ceil(priceForSponsor) << endl;
  24. return 0;
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top