Recent Posts

9-latest-250px-course

Write a C program to Finding factors of a number

Write a C program to Finding factors of a number



Program:-     

#include <stdio.h>

int main()
{
int num;
printf(“\nEnter the number : “);
scanf(“%d”,&num);
int i,count = 0;
printf(“\nThe factors of %d are : “,num);
for(i = 1;i <= num; i++)
{
if(num % i == 0)
{
++count;
printf(“%d “,i);
}
}
printf(“\n\nTotal factors of %d : %d\n”,num,count);
}

Output:-

....
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