text: Count ways to express a number as sum of exactly two numbers | C ++ program to Count ways to express a number as sum of two numbers . ; Function returns the count of ways express a number as sum of two numbers . ; Driver code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; int CountWays ( int n ) { int ans = ( n - 1 ) / 2 ; return ans ; } int main ( ) { int N = 8 ; cout << CountWays ( N ) ; }