По данному целому числу N распечатайте все квадраты натуральных чисел, не превосходящие N, в порядке
Python
# Считываем целое число N
N = int(input("Введите целое число N: "))
# Выводим квадраты натуральных чисел, не превосходящих N
for i in range(1, int(N**0.5) + 1):
square = i**2
if square <= N:
print(square)
else:
break
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.