text: Seating arrangement of n boys and girls alternatively around a round table | C ++ program to find number of ways in which n boys and n girls can sit alternatively sound a round table . ; Driver Code ; Get n ; find fac1 = ( n - 1 ) ! ; Find fac2 = n ! ; Find total number of ways ; Print the total number of ways
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; #define ll  long int NEW_LINE int main ( ) { ll n = 5 ; ll fac1 = 1 ; for ( int i = 2 ; i <= n - 1 ; i ++ ) fac1 = fac1 * i ; ll fac2 = fac1 * n ; ll totalWays = fac1 * fac2 ; cout << totalWays << endl ; return 0 ; }