Number of quadrilateral formed with N distinct points on circumference of Circle | C ++ implementation to find the number of quadrilaterals formed with N distinct points ; Function to find the factorial of the given number N ; Loop to find the factorial of the given number ; Function to find the number of combinations in the N ; Driver Code ; Function Call
#include <bits/stdc++.h> NEW_LINE using namespace std ; int fact ( int n ) { int res = 1 ; for ( int i = 2 ; i < n + 1 ; i ++ ) res = res * i ; return res ; } int nCr ( int n , int r ) { return ( fact ( n ) / ( fact ( r ) * fact ( n - r ) ) ) ; } int main ( ) { int n = 5 ; cout << ( nCr ( n , 4 ) ) ; }