[Solved] How to convert a number into two numbers in the scientific notation?


use this Method to determine your string

public static string ConvertExp(int Value)
{
    int exp = Math.Abs(Value).ToString().Length -1;
    return string.Format("{0} * 10^{1}",( Value / Math.Pow(10 , exp)), exp);
}

and to get 2 values

public static double[] ConvertExp(int Value)
{
    int exp = Math.Abs(Value).ToString().Length -1;
    return new double[] { Value / Math.Pow(10, exp), Math.Pow(10, exp) };
}

0

solved How to convert a number into two numbers in the scientific notation?