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

Test Case | Input (N) | Expected Output |
---|---|---|

1 | 10 | 1 4 9 |

2 | 20 | 1 4 9 16 |

3 | 30 | 1 4 9 16 25 |

Learn IT Today

Python, Java

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

Test Case | Input (N) | Expected Output |
---|---|---|

1 | 10 | 1 4 9 |

2 | 20 | 1 4 9 16 |

3 | 30 | 1 4 9 16 25 |