# Program to find the length of a number in C++ (CPP)

C++ Program to Find the Number of Digits from any number
is today’s topic of discussion in this tutorial.

## C++ Program to Find the Number of Digits Using while loop

Output

Please Enter any number : 4
Number of digits in given number is: 1
——————————–

Output:

## Program of Length of a Number in C++ Using Do While Loop (only for positive values)

Let’s begin with “Program of Length of a Number in C++ Using Do While Loop only for positive values”.

Output

Please enter a number to find its length
545
the length of the number is = 3

## Program of Length of a Number in C++ Using For Loop (only for positive values)

Let’s begin with “Program of Length of a Number in C++ Using For Loop only for positive values”.

Output

## Program of Length of a Number in C++ Using Functions

Let’s begin with “Program of Length of a Number in C++ Using Functions”.

## Program of Length of a Number in C++ Using Nested if Statement

Let’s begin with “Program of Length of a Number in C++ Using Nested If Statement”.

## Program of Length of a Number in C++ Using for loop and if Statement

Let’s begin with “Program of Length of a Number in C++ Using for loop and If Statement”.

## Program of Length of a Number in C++ Using While Loop

Let’s begin with “Program of Length of a Number in C++ Using while loop”.

Program to find the length of a number in C

With Comments – Program to find the length of a number in C++ (CPP)