Given a number N. Write a program to the find number of diagonals possible in N sided convex polygon.
First line of input contains a single integer T, which denotes the number of testcases. T testcases follows. First line of each test case contains a single integer N.
For each testcase in new line, print number of diagonals possible in N sided convex polygon.
1 <= T <= 100
1 <= N <= 103
Testcase 1: The number of diagonals of 5 sided polygon: 5.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.