online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
using System; using System.Collections.Generic; public class Program { public static void Main() { var myString = Console.ReadLine().Trim(' '); // read console input // trim spaces var numericString = new List<char>(); foreach (var c in myString) { if (char.IsDigit(c)) { numericString.Add(c); // if is digit parse } else { break; // the first non digit breaks the cycle } } // parse the value as int if (int.TryParse(numericString.ToArray(), out var myVal)) { Console.WriteLine(myVal); } } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue