6.1. While: List of squares
pole55 (69)

"For a given integer N, print all the squares of positive integers where the square is less than or equal to N, in ascending order."

Example input
50

Example output
1 4 9 16 25 36 49

You are viewing a single comment. View All
pole55 (69)

its all because of "if i**2 <= x" that tells to stop at "10^5" (in your words). without this part, it will print "10^10".