Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Loops
- {
- class Program
- {
- static void Main(string[] args)
- {
- int racket = int.Parse(Console.ReadLine());
- int racketCount = int.Parse(Console.ReadLine());
- int sneekersCount = int.Parse(Console.ReadLine());
- int racketCost = racket * racketCount;
- double sneekers = racket / 6.0;
- double sneekersCost = sneekers * sneekersCount;
- double equipment = (racketCost + sneekersCost) * 0.2;
- double fullSum = racketCost + sneekersCost + equipment;
- double djoPrice = fullSum / 8.0;
- double sponsors = fullSum - djoPrice;
- Console.WriteLine($"Price to be paid by Djokovic {Math.Floor(djoPrice)}");
- Console.WriteLine($"Price to be paid by sponsors {Math.Ceiling(sponsors)}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement