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
Ant
#include <stdio.h>
#include <math.h>
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++)
if(x%y==0)
printf("%d, ", y);
if (factors > max_fac)
printf("%d\n", x);
return 0;
}
}