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 Harvest
- {
- class Harvest
- {
- static void Main(string[] args)
- {
- var x = double.Parse(Console.ReadLine());
- var y = double.Parse(Console.ReadLine());
- var z = double.Parse(Console.ReadLine());
- var workers = double.Parse(Console.ReadLine());
- double totalGrozde = x * y;
- double vino = 0.40 * totalGrozde / 2.5;
- if (vino >= z)
- {
- Console.WriteLine("Good harvest this year! Total wine: {0} liters.", Math.Floor(vino));
- Console.WriteLine("{0} liters left -> {1} liters per person.", Math.Ceiling((vino - z)), Math.Ceiling((vino-z)/workers));
- }
- else
- {
- Console.WriteLine("It will be a tough winter! More {0} liters wine needed.", Math.Floor(z-vino));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement