Cassiniâ €™ s Identity | C # implementation to demonstrate working of CassiniaTMs Identity ; Returns ( - 1 ) ^ n ; Driver Code
using System ; class GFG { static int cassini ( int n ) { return ( n & 1 ) != 0 ? - 1 : 1 ; } public static void Main ( ) { int n = 5 ; Console . Write ( cassini ( n ) ) ; } }