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; }

Want to kickstart your project?Use the new AI Studio to create your code