By Thanos Stantzouris
Choose your prefered Language: greek_flag uk_flag

The square of an integer N can be calculated by adding all integers from 1 to N and returning back to 1,
example: 42 = 1 + 2 + 3 + 4 + 3 + 2 + 1 = 16
Write the appropriate algorithm to compute and display the square of any integer N using this method. The algorithm will accept the entry N as the input. When importing, the condition N> 0 will be checked.