AnastasiyaG

Untitled

Jan 22nd, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Data_Type
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int yield = int.Parse(Console.ReadLine());
  10. int total = yield - 26;
  11. int days = 1;
  12.  
  13.  
  14.  
  15.  
  16. for (int i = yield-10; i >=100; i=i-10)
  17. {
  18. days++;
  19. int byDay = i - 26;
  20. total += byDay;
  21.  
  22.  
  23. }
  24.  
  25. Console.WriteLine($"{days}\n{total-26}");
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment