Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Fundamentals
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int startYeild = int.Parse(Console.ReadLine());
  10. int yeild = startYeild;
  11. int days = 0;
  12. int consumed = 0;
  13. int totalAmountMined = 0;
  14.  
  15. while (yeild >= 100)
  16. {
  17. days++;
  18. totalAmountMined += yeild;
  19. consumed += 26;
  20. yeild -= 10;
  21. }
  22. if (totalAmountMined >= 26)
  23. {
  24. consumed += 26;
  25. }
  26.  
  27. Console.WriteLine(days);
  28. Console.WriteLine(totalAmountMined - consumed);
  29.  
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement