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

This article is written by **plus2net.com** team.

Swapping two numbers sample code
Average of two numbers as entered by user
Highest of three numbers
Finding exam Grade of mark entered using if else condition
Calculation of user entered numbers
Percentage of Mark
Division of Mark
Digits in Number
Sum of Digits
Matrix Multiplication

Post your comments , suggestion , error , requirements etc here