c program to find divisors of a number code example
Example: c program to find divisors of a number
#include <stdio.h>
void main()
{
int x, i;
printf("\nInput an integer: ");
scanf("%d", &x);
printf("All the divisor of %d are: ", x);
for(i = 1; i <= x; i++)
{
if((x%i) == 0)
{
printf("\n%d", i);
printf("\n");
}
}
}