fb pixel

Squares

Given a positive integer n, your task is to find all the numbers that are greater than 1 and their squares don’t exceed n. The program should print the squares of those numbers.
Input
Output
15
1 4 9
 
To check your solution you need to sign in