Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Interval_of_Numbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- var num = int.Parse(Console.ReadLine());
- var num2 = int.Parse(Console.ReadLine());
- bool equal = num != num2;
- if (num > num2) {
- for(int i = num2; i <= num; i++) {
- if(equal == true) {
- Console.WriteLine(i);
- }
- }
- }
- else {
- for(int i = num; i <= num2; i++) {
- if(equal == true) {
- Console.WriteLine(i);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement