Skip to main content

//write C program to input numer from to user and find all divisors of the the given number.

 //write C program to input numer from to user and find all divisors of the the given number.


#include<stdio.h>

int main()

{

int i, num;

printf("Enter any number to find its factor: ");

scanf("%d", &num);

printf("\nAll factor of %d are : \n", num);

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

{

if(num % 1 == 0)

{

printf("%d, ", i);

}

}

return 0;

}