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
#include <bits/stdc++.h> NEW_LINE using namespace std ; float sph ( float r , float h ) { if ( r < 0 && h < 0 ) return -1 ; float R = r ; return R ; } int main ( ) { float r = 4 , h = 8 ; cout << sph ( r , h ) << endl ; return 0 ; }