C Program to print the Factors of the number| Factors program in C|E-studyblog

 C Program to print the Factors of the number| Factors program in C|E-studyblog

In this program,you will learn to print the factors of the number.

                 


C Program to print the Factors of the number| Factors program in C|E-studyblog
C Program to print the Factors of the number| Factors program in C|E-studyblog



What is a factor number?

A Number is said to be factor, when a number divides or multiplies into another number with zero (0) remainder,

Example: Factor of the number 30 are 1,2,3,5,6,10,15,30


Factors program in C|

#include<stdio.h>
void main(){
	int n,i;
	printf("Enter an integer:");
	scanf("%d",&n);
    printf("Factor of the number are:",n);
	for(i=1;i<=n;++i)
	{
		if(n%i==0)
		printf("%d ",i);
	    	
	}
}

Output|
C Program to print the Factors of the number| Factors program in C|E-studyblog



I hope you have read our Article " C Program to print the Factors of the number"and  you have collected lots of information from there.If you like the post,then please comment and share among your friends and family. you can write your opinion about my post in the comment box. 


Thank you!


No comments:

Post a Comment

If you have any queries ,please let us know

C Program to Check whether the number is Even or Odd|how to find odd and even numbers in c programming|E-studyblog

I n this Article, you will learn how to   Check  whether the number is  Even or odd. We have shared the source code of odd and even number i...