Largest sphere that can be inscribed inside a cube | C # Program to find the biggest sphere inscribed within a cube ; Function to find the radius of the sphere ; side cannot be negative ; radius of the sphere ; Driver code
using System ; class GFG { static float sphere ( float a ) { if ( a < 0 ) return - 1 ; float r = a / 2 ; return r ; } static public void Main ( ) { float a = 5 ; Console . WriteLine ( sphere ( a ) ) ; } }