Binary representation of a given number | C # implementation of above approach ; Function to convert decimal to binary number ; Driver code
using System ; public class GFG { static void bin ( int n ) { if ( n > 1 ) bin ( n >> 1 ) ; Console . Write ( n & 1 ) ; } public static void Main ( ) { bin ( 131 ) ; Console . WriteLine ( ) ; bin ( 3 ) ; } }