factors again

Hey thanks for your help.

I used your idea but i am a bit of a beginner at this C programming i have made changes in the code below but can't get it working.

Have i got the right idea...really struggling!!

Thanx again


long int y=1;
int max_fac = 0, x, factors;

main ()

for (x = 1; x <= 1000; x++) {
factors = 1;
for (y = 2; y <= x; y++)

printf("%d, ", y);

if (factors > max_fac)

", x);

return 0;
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!