Quote (Elements_Fury @ Nov 16 2014 11:00pm)
I dotn have one i need to make a pseudocode for this, any type would help, I can only find pseudocodes that do prime numbers to 100 not prime numbers up to a number you enter
then replace 100 with n. what's the problem?
have you considered what strategy you want to take?
one example is sieve of Eratosthenes. you create a list of numbers from 1 to n. then you go through all the multiples of composites and mark them off. whatever's left are the primes.

Alternatively, instead of starting with composite numbers and removing their multiples, you can just loop through each value and ask "is this number prime?" to determine if it's prime, divide by every number <= its sqrt. if anything divides evenly, it's not prime. then you move on to the next number in your list.
This post was edited by carteblanche on Nov 16 2014 10:17pm