fb pixel

Squares in a range

Given a range of numbers [l; r] you are asked to calculate the squares of all the numbers in that range and print them out separated by a space (l and r are inclusive).
The first line contains two numbers l and r.
The program should print a list of numbers separated by a space.
Input
3 7

Output
9 16 25 36 49
 
To check your solution you need to sign in
Sign in to continue