Volume of biggest sphere within a right circular cylinder | C # Program to find the biggest sphere that can be fit within a right circular cylinder ; Function to find the biggest sphere ; radius and height cannot be negative ; radius of sphere ; Driver code
using System ; class GFG { static float sph ( float r , float h ) { if ( r < 0 && h < 0 ) return - 1 ; float R = r ; return R ; } public static void Main ( ) { float r = 4 , h = 8 ; Console . WriteLine ( sph ( r , h ) ) ; } }