Squares of natural numbers

Report a typo

You have an integer number N. Read it from the standard input and print all squares of natural numbers that do not exceed N in ascending order.

Sample Input 1:

50

Sample Output 1:

1
4
9
16
25
36
49

Sample Input 2:

49

Sample Output 2:

1
4
9
16
25
36
49
Write a program in Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic