trying to take values at i, if x is moded by i and equals 0 then scan factor into array, then print value of factored array,,, problem is it loops permanently or gives me a whole bunch of garbage, if anyone can point me in the right direction it would be appreciated,,,,
thnx
Code:int Factor () { int i=0, x=0, num1 , j=0; int n[50]; x=GetNum(num1); printf("The Factors are:\n"); for ( i = x; i > 0; i--) { if (x % i == 0) for(j=i; j > 0; j++) { scanf(" %d",&n[j]); for(j=0; j>=50; j++) { printf("%d ",&n[j]); } } } printf("\n\n"); }