Advertisement
liub0

Lemonade Stand

Nov 17th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp22
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9.  
  10. double kgLemons = double.Parse(Console.ReadLine());
  11. double kgShugar = double.Parse(Console.ReadLine());
  12. double litersWater = double.Parse(Console.ReadLine());
  13.  
  14. double mlLemonade = kgLemons * 980;
  15. double totalMlLemonade = mlLemonade + litersWater * 1000 + ((kgShugar / 100) * 30);
  16. double totalCups = totalMlLemonade / 150;
  17. double totalMoney = totalCups * 1.2;
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. Console.WriteLine($"All cups sold: {totalCups:f0}");
  25. Console.WriteLine($"Money earned: {totalMoney:f2}");
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement