text: Number of ways to choose a pair containing an even and an odd number from 1 to N | C ++ implementation of the above approach ; Driver code
code: #include <iostream> NEW_LINE using namespace std ; int main ( ) { int N = 6 ; int Even = N / 2 ; int Odd = N - Even ; cout << Even * Odd ; return 0 ; }