User:Achyutaryaa

Find co-factors of a number entered through a user using keyboard in C program.

Program is:

// This program will find out all co-factors of a given number.


 * 1) include

int main {   int n, i;    system("cls"); printf("Enter a number to find their co-factor: "); scanf("%d",&n); printf("Co-factors of %d are: ",n); for ( i = 1; i <= n; i++) {       if (n%i==0) {           printf("%d, ",i); }   }    return 0; }