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 swap two number with using third variable
- C Program to find the factorial of the number
- C Program to check whether the number is Palindrome or not
- C Program to swap two number without using Third variable
- C Program to display Fibonacci in c using for loop
- C Program using Switch case to enter a digit (0-9) and write in word
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|
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