Дано число a. Знайдіть 5 простих чисел, більших a.
python

Ответы

Ответ дал: ppgem374
0

a = int(input("Введіть число: "))

count = 0

i = a + 1

while count < 5:

   if i % 2 != 0 and i % 3 != 0 and i % 5 != 0 and i % 7 != 0:

       print(i)

       count += 1

   i += 1

Вас заинтересует