Domanda di colloquio di AMD

Write a code for: Given an integer, print all prime numbers up to that integer.