text: Decimal to Binary using recursion and without using power operator | C # implementation of the approach ; Recursive function to convert n to its binary equivalent ; Base case ; Recursive call ; Driver code
code: using System ; class GFG { static void decimalToBinary ( int n ) { if ( n == 0 ) { Console . Write ( "0" ) ; return ; } decimalToBinary ( n / 2 ) ; Console . Write ( n % 2 ) ; } public static void Main ( String [ ] args ) { int n = 13 ; decimalToBinary ( n ) ; } }