using System; using System.Collections.Generic; namespace lab3 { class FindNum { private List intList; private List digitList; private int border; public FindNum(int border) { intList = new List(); digitList = new List(); this.border = border; } private void SplitByDigits(int value) { while(value > 0) { digitList.Add(value % 10); value /= 10; } } public void Solution() { for(int value = 0; value <= border; value++) { SplitByDigits(value); if (digitList.Contains(9)) intList.Add(value); digitList.Clear(); } } public string GetNums() { string outStr = ""; foreach (int item in intList) outStr += item + " "; return outStr; } } }