1import java.util.Scanner;
2public class CountingDigitsInInteger {
3 public static void main(String args[]){
4 Scanner sc = new Scanner(System.in);
5 int count = 0;
6 System.out.println("Enter a number ::");
7 int num = sc.nextInt();
8 while(num!=0){
9 num = num/10;
10 count++;
11 }
12 System.out.println("Number of digits in the entered integer are :: "+count);
13 }
14}