Horje
expected number of trials to get n consecutive heads Code Example
expected number of trials to get n consecutive heads
#include "bits/stdc++.h"
using namespace std;
  
// Driver Code
int main()
{
    int N = 3;
  
    // Formula for number of trails for
    // N consecutive heads
    cout << pow(2, N + 1) - 2;
    return 0;
}




Cpp

Related
user defined key for map in c++ Code Example user defined key for map in c++ Code Example
cpp code for euclids GCD Code Example cpp code for euclids GCD Code Example
C++ Area of a Rectangle Code Example C++ Area of a Rectangle Code Example
C++ Arithmetic Operators Code Example C++ Arithmetic Operators Code Example
retourner pointeur de type qstringlist qt Code Example retourner pointeur de type qstringlist qt Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10