How can I write a program to calculating square numbers. The program should read a single line of input containing an integer, and print out the squares of all numbers up to and including that number.

Your program should work like this:

Example 1

Enter a number: 4

1 squared is 1

2 squared is 4

3 squared is 9

4 squared is 16

Example 2

Enter a number: 6

1 squared is 1

2 squared is 4

3 squared is 9

4 squared is 16

5 squared is 25

6 squared is 36