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 rekolta
- {
- class Program
- {
- static void Main(string[] args)
- {
- double plosht = double.Parse(Console.ReadLine());
- double Grozde = double.Parse(Console.ReadLine()); // kg grozde ot 1 kvadraten metar
- double VinoZaProdan = double.Parse(Console.ReadLine());
- int rabotnici = int.Parse(Console.ReadLine());
- double LitriGrozde = plosht * Grozde;
- double vino = LitriGrozde * 0.4 / 2.5;
- double razlika = Math.Abs(VinoZaProdan - vino);
- double VinoRabotnici = Math.Floor(razlika / rabotnici);
- if (vino >= VinoZaProdan)
- {
- Console.WriteLine("Good harvest this year! Total wine: {0} liters.",Math.Floor(vino));
- Console.WriteLine("{0} liters left -> {1} liters per person.",Math.Floor(razlika),VinoRabotnici);
- }
- else
- {
- Console.WriteLine("It will be a tough winter! More {0} liters wine needed.",Math.Floor(razlika));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement