Post Top Ad

Your Ad Spot

Pages

Sunday, 9 February 2020

Write A Program To Count number OF DIGIT


#include<stdio.h>
#include<conio.h >
// Digit count LOGIC
int NofDig(int no)
 {
int i,res=0;
  for(i=0;no;i++)
     {
  res=res*10+no%10;
  no=no/10;
     }   
  return i;
 }
void main()
{
printf("%d",NofDig(153));
}

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages