Factors of Given Numbers

Share it Please
this program is used to print the factors of given number.this program works on while loop as well as if condition.if 10 is entered in it then it will print like following:

1*10=10,2*5=10,5*2=10,10*1=10

Program:

#include<stdio.h>
#include<conio.h>
main()
{
      long num,fact,div,i;
      clrscr();
      fact=1;
      printf("Enter number to view factors: ");
      scanf("%ld",&num);
      printf("\nFactors are:");
      while(fact<=num)
      {
          if(num%fact==0)
          {
               div=num/fact;
               printf(" %ld*%ld=%ld,",fact,div,num);
          }
          fact++;
      }
      getch();
      return 0;
}