string str = "31131123521";int result = 1;foreach (char c in str){ int digit = int.Parse(c.ToString()); result *= digit;}Console.WriteLine(result);
string wholeString = Console.ReadLine(); string multiplicationNumbers = ""; foreach (var letter in wholeString) { if (char.IsDigit(letter)) { multiplicationNumbers += letter; } } Console.WriteLine(multiplicationNumbers); for (int i = 0; i < multiplicationNumbers.Length; i++) { }