Minimum number of coins that can generate all the values in the given range | C ++ program to find minimum number of coins ; Function to find minimum number of coins ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int findCount ( int n ) { return log ( n ) / log ( 2 ) + 1 ; } int main ( ) { int N = 10 ; cout << findCount ( N ) << endl ; return 0 ; }