Hi I have this homework question that asks the user to make a program where the computer outputs the prime numbers from 1 to 1000. Can you please take a look at my attempt and tell me where I can improve?
Hint* These are fun to do, You left out only the boolean variable that sets a flag if the number can be evenly divided. If the outcome of dividing the outer loop by the inner loop leaves a remainder, set the flag the true, otherwise set it to false and break out of that loop immediatly. Then outside the inner loop test if the flag is true, print the number of the outer loop counter, or 'number' in your case.