Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NumbersInIntervalDividableby5
- {
- static void Main()
- {
- int start = int.Parse(Console.ReadLine());
- int end = int.Parse(Console.ReadLine());
- int realStart = (start / 5) * 5 + 5;
- int realEnd = (end / 5) * 5;
- int count = (realEnd - realStart) / 5 + 1;
- Console.WriteLine(start % 5 == 0 ? ++count : count);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement