I'm new to this sight and have a smallish amount of programming knowledge, so a simpler answer would be great.
For some reason, whenever I try to run this code with a H 13 or higher, it says that the program stopped working. I am using the Dev compiler and have tried debugging, and it says it thinks the problem is in line "divisorList[arrayCounter]=divisorTest;". However, I can't seem to figure out what the problem is...
Anything would be helpful.
int H, numOfHiddenDots, arraySlots, counterH, arrayCounter, arrayResetCounter, divisorTest, divisorTestTest, divisorRunthrough;
H=(whatever you want)
for (counterH=1; counterH<=H; counterH++)
for (arrayResetCounter=0; arrayResetCounter<=counterH+1; arrayResetCounter++)
if (counterH%100==0) printf ("%d milestone reached in calculations.\n", counterH);
for (divisorTest=1; divisorTest<counterH; divisorTest++)
for (divisorTestTest=2; divisorTestTest<arrayCounter-1; divisorTestTest++)
if (divisorList[divisorTestTest]!=0&&divisorTest%divisorList[divisorTestTest]==0) divisorList[divisorTestTest]=0;
for (divisorRunthrough=1; divisorRunthrough<arrayCounter; divisorRunthrough++)
if (divisorList[divisorRunthrough]<=1) numOfHiddenDots=numOfHiddenDots+divisorList[divisorRunthrough]*6;
printf ("The number of dots hidden from the center is: %d\n", numOfHiddenDots);