In this tutorial, we are going to make a C Program to Print Factors of a given number with step by step full complete explanation. 

C Program to Print Factors of a given number

C Program to Print Factors of a given number

#include<stdio.h>
#include<conio.h>
Void main()
{
      Int input, i;

printf(“Enter any number:”);
scanf(“%d”,&input);

for(i=1; i<=input; i++)

{
   If (input%i ==0)
     printf(“%d, “,i);
}
getch();
}

Output

C Program to Print Factors of a given number