Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FootballKit
- {
- class Program
- {
- public static void Main()
- {
- double shirtPrice = double.Parse(Console.ReadLine());
- double sum = double.Parse(Console.ReadLine());
- double shortsPrice = shirtPrice * 0.75;
- double socksPrice = shortsPrice * 0.20;
- double sneakersPrice = (shirtPrice + shortsPrice) * 2;
- double price = (shirtPrice + shortsPrice + socksPrice + sneakersPrice) * 0.85;
- if (sum > price)
- {
- Console.WriteLine("No, he will not earn the world-cup replica ball.");
- Console.WriteLine($"He needs {sum - price:f2} lv. more.");
- }
- else
- {
- Console.WriteLine("Yes, he will earn the world-cup replica ball!");
- Console.WriteLine($"His sum is {price:f2} lv.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement