Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace tenis
- {
- class Program
- {
- static void Main(string[] args)
- {
- double priceOneTennisRacket = double.Parse(Console.ReadLine());
- double numberTennisRacket = double.Parse(Console.ReadLine());
- double numberShoes = double.Parse(Console.ReadLine());
- double priceAllRackets = priceOneTennisRacket * numberTennisRacket;
- double priceShoes = priceOneTennisRacket / 6;
- double allShoes = priceShoes * numberShoes;
- double other = (allShoes + priceAllRackets) * 0.2;
- double totalPrice = priceAllRackets + allShoes + other;
- double priceForDjoko = totalPrice / 8;
- double priceForSponsor = (totalPrice * 7) / 8;
- priceForDjoko = Math.Floor(priceForDjoko);
- priceForSponsor = Math.Ceiling(priceForSponsor);
- Console.WriteLine($"Price to be paid by Djokovic {priceForDjoko}");
- Console.WriteLine($"Price to be paid by sponsors {priceForSponsor}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement