Go Program to find First Digit of a Number

Write a Go Program to find the First Digit of a Number using For loop. The for loop condition (for firstDigit >= 10) returns true until the number is greater than or equals to 10. We divide the number by 10 (firstDigit = firstDigit / 10), which will return the first value after all the … Read more