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