Advertisement
Guest User

Untitled

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