OCJP

Factor Of Digit

#include<stdio.h>
#include<conio.h>
void main()
{
int x,i,c=0;
clrscr();
      printf("\n input the value:");
      scanf("\n%d",&x);
      for(i=1;i<=x;i++)
      {
      if(x%i==0)
      {
      printf("\n%d:",i);
      c++;
      }

      }
       printf("\ntotal count %d ",c);
getch();
}

Output

Leave a Reply

Your email address will not be published. Required fields are marked *


× How can I help you?