How to write C Program to Find Factors Of A Given Number in C Programming Language ?
Solution For C Program :
#include<stdio.h>
void main()
{
int x, n, sum;
printf("\nEnter the Number : ");
scanf("%d", &n);
x = 1;
printf("\nThe Factor's of %d are : ", n);
while(x <= n)
{
if(n % x == 0)
printf("%2d,", x);
x++;
}
}
You may also learn these C Program/Code :