Переменную строки буду называть
.
1.22.
int.Parse(t.ToString())).Sum());}" alt="\texttt{Console.WriteLine(str.Select(t => int.Parse(t.ToString())).Sum());}" align="absmiddle" class="latex-formula">
1.23.
()}\\\texttt{{ }{ }{ }{ }.Select(t => t.Value.Replace("+", ""))}\\\texttt{{ }{ }{ }{ }.Select(int.Parse)}\\\texttt{{ }{ }{ }{ }.Sum());}' alt='\texttt{Console.WriteLine(Regex.Matches(str, @"[+-]*}\char`\\\texttt{d+")}\\\texttt{{ }{ }{ }{ }.Cast()}\\\texttt{{ }{ }{ }{ }.Select(t => t.Value.Replace("+", ""))}\\\texttt{{ }{ }{ }{ }.Select(int.Parse)}\\\texttt{{ }{ }{ }{ }.Sum());}' align="absmiddle" class="latex-formula">
1.24.
![\texttt{Console.WriteLine(Convert.ToInt32(str, 2).ToString());} \texttt{Console.WriteLine(Convert.ToInt32(str, 2).ToString());}](https://tex.z-dn.net/?f=%5Ctexttt%7BConsole.WriteLine%28Convert.ToInt32%28str%2C%202%29.ToString%28%29%29%3B%7D)
Потребуется использовать
![\texttt{using System.Linq;} \texttt{using System.Linq;}](https://tex.z-dn.net/?f=%5Ctexttt%7Busing%20System.Linq%3B%7D)
![\texttt{using System.Text.RegularExpressions;} \texttt{using System.Text.RegularExpressions;}](https://tex.z-dn.net/?f=%5Ctexttt%7Busing%20System.Text.RegularExpressions%3B%7D)