viraco4a

06. Interval of Numbers

May 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 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 _06_IntervalOfNumbers
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int One = int.Parse(Console.ReadLine());
  14. int Two = int.Parse(Console.ReadLine());
  15. int start = 0;
  16. int stop = 0;
  17. if (One > Two)
  18. {
  19. start = Two;
  20. stop = One;
  21. }
  22. else
  23. {
  24. start = One;
  25. stop = Two;
  26. }
  27. for (int i = start; i <= stop; i++)
  28. {
  29. Console.WriteLine(i);
  30. }
  31. }
  32. }
  33. }
Add Comment
Please, Sign In to add comment