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 areaX = int.Parse(Console.ReadLine());
- var dobivY = double.Parse(Console.ReadLine());
- var wineWhish = int.Parse(Console.ReadLine());
- var employees = int.Parse(Console.ReadLine());
- var areaWIne = 40 * areaX / 100; //
- var wineL = areaWIne * dobivY / 2.5; // vino v litri
- if (wineL < wineWhish)
- {
- var nedostigWine = Math.Floor(wineWhish-wineL);
- Console.WriteLine("It will be a tough winter! More {0} liters wine needed.", nedostigWine);
- }
- else if (wineL >= wineWhish)
- {
- var pove4eWine = (wineL - wineWhish);
- var totalWine = Math.Floor(wineWhish + pove4eWine);
- var vinoZaEmployees = pove4eWine/employees;
- Console.WriteLine("Good harvest this year! Total wine: {0} liters.", totalWine);
- Console.WriteLine("{0} liters left -> {1} liters per person.", Math.Round(pove4eWine), Math.Round(vinoZaEmployees));
- }
- }
- }
- }
- //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement