num = gets.to_i last = gets.to_i while (num <= last) prime_flag = true x = 2 while (x <= num/ 2) if (num % x == 0) prime_flag = false break end x += 1 end if prime_flag puts num end num += 1 end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)