Find nth Hermite number | C ++ program to find nth Hermite number ; Function to return nth Hermite number ; Base conditions ; Driver Code ; Print nth Hermite number
#include <bits/stdc++.h> NEW_LINE using namespace std ; int getHermiteNumber ( int n ) { if ( n == 0 ) return 1 ; if ( n == 1 ) return 0 ; else return -2 * ( n - 1 ) * getHermiteNumber ( n - 2 ) ; } int main ( ) { int n = 6 ; cout << getHermiteNumber ( n ) ; return 0 ; }