Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FootballKit
- {
- class Program
- {
- static void Main(string[] args)
- {
- double priceTshirt = double.Parse(Console.ReadLine());
- double sumForBall = double.Parse(Console.ReadLine());
- double priseShorts = priceTshirt * 0.75;
- double pricestocks = priseShorts * 0.2;
- double pricebutton = 2 * (priceTshirt + priseShorts);
- double totallPrise = (priceTshirt + priseShorts + pricestocks + pricebutton);
- double discount = totallPrise - (totallPrise * 0.15);
- if (totallPrise >= sumForBall)
- {
- Console.WriteLine("Yes, he will earn the world-cup replica ball!");
- Console.WriteLine($"His sum is {discount:F2} lv.");
- }
- else
- {
- Console.WriteLine("No, he will not earn the world-cup replica ball.");
- Console.WriteLine($"He needs {Math.Abs(sumForBall - discount):F2} lv. more.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement