Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _11.Interval
  8. {
  9. class Interval
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. int m = int.Parse(Console.ReadLine());
  15.  
  16. int counter = 0;
  17. for (int i = n + 1; i <= m; i++)
  18. {
  19. if (i % 5 == 0)
  20. {
  21. counter++;
  22. }
  23. }
  24.  
  25. Console.WriteLine(counter);
  26.  
  27. //int N = int.Parse(Console.ReadLine());
  28. //int M = int.Parse(Console.ReadLine());
  29. //Console.WriteLine((M - N + N % 5 - 1) / 5);
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement