4 comments:

  1. $num1=$_POST["num"];
    $length=0;
    $temp=$num1;
    while($temp>=1)
    {
    $temp/=10;
    $length++;
    }
    echo "Length of $num1= $length";

    ReplyDelete
  2. php
    $n=$_POST['num'];
    $count=0;
    while($n>1)
    {$n=$n/10;
    $count++;
    }
    echo "$count";
    ?>

    ReplyDelete
  3. $num=$_POST["n"];
    $temp=$num;
    $length=0;
    while($temp>=1)
    {
    $temp/=10;
    $length++;
    }
    echo "Length of $num:".$length;

    ReplyDelete
  4. ?php
    $nos=$_POST["num"];
    $length=0;
    while($nos>1)
    {$nos=$nos/10;
    $length++;
    }
    echo"length of number is : ". "$length";
    ?>

    ReplyDelete