factors of a input number

Factor of number are integers when divided with the number lives no reminder or 0 as reminder.

Example :

1,3 & 5 are three factors of number 15.
1,2,3,4,6 are factors of number 12
#include <stdio.h>
int main(void){
int i;
int num;
printf("Enter the number ");
scanf("%d",&num);

for ( i=1;i<num;i++){
if(num % i ==0){
 printf("%d,",i);
}
}
return 0;
}
Output is here if you enter 12 as input
1,2,3,4,6,
There are some numbers for which only factors are 1 and itself ( same number ) , they are known as prime numbers.

List of Prime Numbers Common Factors of Two input numbers
Your Rating




Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer