For this Question: Given a number N. Write a program to the find number of diagonals possible in N sided convex polygon.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>numberOfDiagonal()</b> that takes the integer N parameter.

Constraints:
1 <= T <= 100
1 <= N <= 10^3Return number of diagonals possible in N sided convex polygon.Sample Input:
3
3
5
6

Sample Output:
0
5
9

Explanation:
For test case 2: The number of diagonals of 5 sided polygon: 5., I have written this Solution Code: 

int numberOfDiagonals(int n){
    if(n<=3){return 0;}
    return (n*(n-3))/2;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?