Pregunta de entrevista de AMD

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