Advertisement
SamuilPetrow

Console Input/Output - Task 11

Mar 14th, 2014
1,478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2. namespace ConsoleInputOutput
  3. {
  4.     public static class Intervals
  5.     {
  6.         public static void Main()
  7.         {
  8.             long start = long.Parse(Console.ReadLine());
  9.             long end = long.Parse(Console.ReadLine());
  10.             int count = 0;
  11.             for (long i = start; i <= end; i++)
  12.             {
  13.                 if (i%5==0)
  14.                 {
  15.                     count++;
  16.                 }
  17.             }
  18.             Console.WriteLine(count);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement