Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _05._Easter_Bake
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int cosunacCount = int.Parse(Console.ReadLine());
  10. double sugarPakage = 0;
  11. double flourPakage = 0;
  12. int sugarQuantityConsumed = 0;
  13. int flourQuantityConsumed = 0;
  14.  
  15. for (int i = 0; i < cosunacCount; i++)
  16. {
  17. sugarQuantityConsumed += int.Parse(Console.ReadLine());
  18. flourQuantityConsumed += int.Parse(Console.ReadLine());
  19. }
  20. sugarPakage = Math.Ceiling((double)sugarQuantityConsumed / 950);
  21. flourPakage = Math.Ceiling((double)flourQuantityConsumed / 750);
  22.  
  23. Console.WriteLine($"Sugar: {sugarPakage}");
  24. Console.WriteLine($"Flour: {flourPakage}");
  25. //Console.WriteLine($"Max used flour is {максимално количество грамове брашно, използвани за правенето на козунак} grams, max used sugar is {максимално количество грамове захар, използвани за правенето на козунак} grams.");
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement