C Programming
Computer Programming

Program in c to Display Factors of a Number



Write a Program in c to Display Factors of a Number

\* C Program to to Display Factors of a Number *\

# include < stdio.h >
int   main( )
{

int   num, i, fact  ;
printf(" Enter the Number : ") ;
scanf("%d ", & num) ;
printf("\n Factors of Numbers are : ") ;
for (   i = 1;   i <= num ;   i++  ) ;
{

if( num % i == 0 )
printf("\n %d " ,i) ;

}
return ( 0 ) ;

}

Output of Program :

Output of Program in C to Display Factors of a Number