What is wrong with my No numerals!
I passed all case, without case 3. Can someone help me ? class Program { static void Main(string[] args) { string s = Console.ReadLine(); Console.WriteLine(Kajman.NoNumerals(s)); } } public class Kajman { public static string NoNumerals(string str) { Kajman k = new Kajman(); str= k.Ten(str); return str.Replace("0", "zero").Replace("2", "two").Replace("3", "three").Replace("4", "four").Replace("5", "five").Replace("6", "six") .Replace("7", "seven").Replace("8", "eight").Replace("9", "nine").Replace("1", "one"); } public string Ten(string str) { string x = ""; for (int i = 0; i < str.Length; i++) { if (str[i] == '1') { if (str[++i] == '0') { x= str.Replace("10", "ten"); } }else x=str; } return x; } }