class Program
{
static void Main(string[] args)
{
int n, count = 0;
Console.Write("Enter
the number : ");
n
= int.Parse(Console.ReadLine());
while (n > 0)
{
count++;
n = n / 10;
}
Console.WriteLine("The
number of digits in the integer is " + count);
Console.ReadLine();
No comments:
Post a Comment