Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Harvest
- {
- class Program
- {
- static void Main(string[] args)
- {
- int squareM = int.Parse(Console.ReadLine());
- var squareMR = squareM * 0.4;
- double grapeSM = double.Parse(Console.ReadLine())*squareMR;
- var vine = grapeSM / 2.5;
- var needLiterV = int.Parse(Console.ReadLine());
- var numWorkers = int.Parse(Console.ReadLine());
- if (vine>=needLiterV)
- {
- Console.WriteLine($"Good harvest this year! Total wine: {Math.Truncate(vine)} liters.");
- Console.WriteLine($"{Math.Ceiling(vine-needLiterV)} liters left -> {Math.Ceiling((vine-needLiterV)/numWorkers)} liters per person.");
- }
- else
- {
- Console.WriteLine($"It will be a tough winter! More {Math.Floor(needLiterV-vine)} liters wine needed.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement