Lucas Numbers | Recursive C # program to find n 'th Lucas number ; recursive function ; Base cases ; recurrence relation ; Driver program
using System ; class GFG { public static int lucas ( int n ) { if ( n == 0 ) return 2 ; if ( n == 1 ) return 1 ; return lucas ( n - 1 ) + lucas ( n - 2 ) ; } public static void Main ( ) { int n = 9 ; Console . WriteLine ( lucas ( n ) ) ; } }