Advertisement
Guest User

Egg Farm

a guest
Nov 20th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp39
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int eggPrice = int.Parse(Console.ReadLine());
  10. int firstMonth = int.Parse(Console.ReadLine());
  11. int secondMonth = int.Parse(Console.ReadLine());
  12. int thirdMonth = int.Parse(Console.ReadLine());
  13. double leva = eggPrice * 0.010;
  14.  
  15. int eggCount = (firstMonth * 20) + ((firstMonth + secondMonth) * 20) + ((firstMonth + secondMonth + thirdMonth) * 20);
  16. int totalEggs = ((eggCount * 96) / 100);
  17. double profit = Math.Floor(totalEggs * leva);
  18. Console.WriteLine(profit);
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement