generate functionThu, 22 Dec 2022

write a function to receive a whole number and returns the length of the number do not use string

public int NumberLength(int number) { var count = 0; while (number != 0) { number /= 10; count++; } return count; }

Questions about programming?Chat with your personal AI assistant