Finding the imaginary part of the complex number
String imaginary = s . Substring ( i + 1 , l - i - 2 ) ; int x = Int32 . Parse ( real ) ; int y = Int32 . Parse ( imaginary ) ; Console . Write ( Math . Sqrt ( x * x + y * y ) + " STRNEWLINE " ) ; }