C program to input a number from user and find all factors of the given number using [for loop]




/*factors of given number */


#include<stdio.h>
#include<conio.h>
void  main ()

  clrscr();
  int a,i;
 printf("enter the number :");
 scanf("%d",&a);
 printf("factorial of %d are :\n ",a) ;
 for(i=1;i<=a;i++)
 {
     if(a%i==0)
     {    printf("%d\t",i);
     }
 }
 getch();

}









SHARE

Milan Tomic

Hi. I’m Designer of Blog Magic. I’m CEO/Founder of ThemeXpose. I’m Creative Art Director, Web Designer, UI/UX Designer, Interaction Designer, Industrial Designer, Web Developer, Business Enthusiast, StartUp Enthusiast, Speaker, Writer and Photographer. Inspired to make things looks better.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment