text: Java implementation to find the probability of not getting two consecutive heads together when N coins are tossed
code: class GFG { public static float round ( float var , int digit ) { float value = ( int ) ( var * Math . pow ( 10 , digit ) + .5 ) ; return ( float ) value / ( float ) Math . pow ( 10 , digit ) ; }