Guest User

tenis

a guest
Jan 13th, 2020
147
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace tenis
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             double priceOneTennisRacket = double.Parse(Console.ReadLine());
  13.  
  14.             double numberTennisRacket = double.Parse(Console.ReadLine());
  15.              double numberShoes = double.Parse(Console.ReadLine());
  16.  
  17.             double priceAllRackets = priceOneTennisRacket * numberTennisRacket;
  18.  
  19.             double priceShoes = priceOneTennisRacket / 6;
  20.             double allShoes = priceShoes * numberShoes;
  21.             double other = (allShoes + priceAllRackets) * 0.2;
  22.             double totalPrice = priceAllRackets + allShoes + other;
  23.             double priceForDjoko = totalPrice / 8;
  24.             double priceForSponsor = (totalPrice * 7) / 8;
  25.             priceForDjoko = Math.Floor(priceForDjoko);
  26.             priceForSponsor = Math.Ceiling(priceForSponsor);
  27.             Console.WriteLine($"Price to be paid by Djokovic {priceForDjoko}");
  28.             Console.WriteLine($"Price to be paid by sponsors {priceForSponsor}");  
  29.         }
  30.     }
  31. }
RAW Paste Data