Advertisement
ss3434

Untitled

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