Advertisement
TeMePyT

Untitled

Jan 25th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Harvest
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int areaVineyard = int.Parse(Console.ReadLine());
  14. double AmmountGrapesPerSqM = double.Parse(Console.ReadLine());
  15. int neededWine = int.Parse(Console.ReadLine());
  16. int workers = int.Parse(Console.ReadLine());
  17.  
  18. var totalGrapes = AmmountGrapesPerM * AreaLoze;
  19. var wine = (totalGrapes * 40 / 100) / 2.5;
  20. var wineleft = wine - neededWine;
  21.  
  22. if (wine>=neededWine)
  23. {
  24. Console.WriteLine("Good harvest this year! Total wine: {0} liters.", Math.Floor(wine));
  25. Console.WriteLine("{0} liters left -> {1} liters per person.", Math.Ceiling(wineleft), Math.Ceiling((wineleft/workers)));
  26. }
  27. else
  28. {
  29. Console.WriteLine("It will be a tough winter! More {0} liters wine needed.", Math.Floor(neededWine-wine));
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement