Answers for "c# get first number of int"

0

on in get first two digit start with two numbers c#

int firstDigit = (int)(Value / Math.Pow(10, (int)Math.Floor(Math.Log10(Value))));
Posted by: Guest on July-10-2020
0

on in get first two digit start with two numbers c#

public static int GetFirstDigitLoop(int number)
{
    while (number >= 10)
    {
        number = (number - (number % 10)) / 10;
    }
    return number;
}
Posted by: Guest on July-10-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language