veronikaaa86

06. Interval of Numbers

Jan 31st, 2018
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. namespace Ex6_IntervalOfNumbers
  2. {
  3.     using System;
  4.     public class Program
  5.     {
  6.         public static void Main(string[] args)
  7.         {
  8.             int numOne = int.Parse(Console.ReadLine());
  9.             int numTwo = int.Parse(Console.ReadLine());
  10.  
  11.             for (int i = Math.Min(numOne, numTwo); i <= Math.Max(numOne, numTwo); i++)
  12.             {
  13.                 Console.WriteLine(i);
  14.             }
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment