Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class NumsInIntervalDividableByFive
- {
- static void Main(string[] args)
- {
- int start = int.Parse(Console.ReadLine());
- int end = int.Parse(Console.ReadLine());
- int p = 0;
- while ( start % 5 != 0 ) {
- ++start;
- if (start == end && start % 5 != 0) {
- Console.WriteLine(p);
- Environment.Exit(0);
- }
- }
- p = ((end - start) / 5) + 1;
- Console.WriteLine(p);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement