Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Find the number of digits in an integer

Easy

Problem Statement

Find the number of digits in an integer

Sample Input

12345

Sample Output

The number of digits is: 5

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
fun main() { val number = 12345 // Add your code here to count the digits }
Log in or sign up to run or submit your code.Log inSign up
Input
12345
Expected Output
The number of digits is: 5