Prime numbers program

后端 未结 14 1596
无人及你
无人及你 2021-01-07 00:27

I\'m currently trying out some questions just to practice my programming skills. ( Not taking it in school or anything yet, self taught ) I came across this problem which re

14条回答
  •  时光取名叫无心
    2021-01-07 01:11

    for(int currentInt=2; currentInt<=1000000; currentInt++) 
    
    {check = false;  // Basically the idea for this for loop is to run checks against integers. This is the main for loop in this program. I re initialize check to false ( check is a bool declared above this. )
    
    for( int arrayPrime=0; arrayPrime

    Thanks for the advice polythinker =)

提交回复
热议问题