/
akryukov
/
programming-basics
Обзор
Документация
Войти
/
akryukov
/
programming-basics
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/cs_src/TaskCs3305.cs
42 строки
1 KB
Alexander Kryukov
move task 9990 to coded task
18 ноя 2023, 13:24
18 ноя 2023, 13:24
9cedd2a
Код
Авторство
О чём код?
using System; using System.Collections.Generic; namespace Example { class Program { static List<int> Task3305(int first, int second) { List<int> listInts = new List<int>(); if (first < second) { while (first <= second) { listInts.Add(first); first++; } } else { while (second <= first) { listInts.Add(second); second++; } } return listInts; } static void Main(string[] args) { int first = int.Parse(Console.ReadLine()); int second = int.Parse(Console.ReadLine()); List<int> result = Task3305(first, second); int i = 0; while (i < result.Count) { Console.Write(result[i] + " "); i = i + 1; } } } }