Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- double x = double.Parse(Console.ReadLine());
- double y = double.Parse(Console.ReadLine());
- double z = double.Parse(Console.ReadLine());
- double rab = double.Parse(Console.ReadLine());
- double total = 0.4 * (x * y) / 2.5;
- if (total >= z)
- {
- Console.WriteLine("Good harvest this year! Total wine: {0} liters.", Math.Floor(total));
- Console.WriteLine("{0} liters left -> {1} liters per person.", Math.Ceiling(total - z), Math.Ceiling((total - z) / rab));
- }
- else
- {
- Console.WriteLine("It will be a tough winter! More {0} liters wine needed.", Math.Floor(z - total));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement