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 Change_Tiles
- {
- class Program
- {
- static void Main(string[] args)
- {
- decimal moneyGathered = decimal.Parse(Console.ReadLine());
- decimal widthFloor = decimal.Parse(Console.ReadLine());
- decimal lenghtFloor = decimal.Parse(Console.ReadLine());
- decimal sidePlate = decimal.Parse(Console.ReadLine());
- decimal heightPlate = decimal.Parse(Console.ReadLine());
- decimal pricePlate = decimal.Parse(Console.ReadLine());
- decimal priceMaistor = decimal.Parse(Console.ReadLine());
- decimal moneyNeeded = 0M;
- decimal s = widthFloor * lenghtFloor;
- decimal s1 = (sidePlate * heightPlate) / 2;
- decimal plateNeeded = s / s1;
- plateNeeded = Math.Ceiling(plateNeeded) + 5;
- moneyNeeded = (plateNeeded * pricePlate) + priceMaistor;
- if (moneyNeeded <= moneyGathered)
- {
- Console.WriteLine("{0:F2} lv left.", moneyGathered - moneyNeeded);
- }
- else
- {
- Console.WriteLine("You'll need {0:f2} lv more.", moneyNeeded - moneyGathered);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement