Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace ConsoleApplication
- {
- internal class Program
- {
- public static void Main(string[] args)
- {
- var takemoney = decimal.Parse(Console.ReadLine());
- var weight = decimal.Parse(Console.ReadLine());
- var height = decimal.Parse(Console.ReadLine());
- var a = decimal.Parse(Console.ReadLine());
- var h = decimal.Parse(Console.ReadLine());
- var prize = decimal.Parse(Console.ReadLine());
- var maistor = decimal.Parse(Console.ReadLine());
- var x = (weight * height) / (a * h / 2);
- var total = Math.Ceiling(x) + 5;
- var y = total * prize + maistor;
- if (y <= takemoney)
- {
- Console.WriteLine("{0:f2} lv left.", takemoney-y);
- }
- else
- {
- Console.WriteLine("You'll need {0:f2} lv more.", y-takemoney);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement