src/Kepler3rdLaw.cpp
/*************************************************************
* Purpose: Finds the distance of an object from the Sun in AU
*
* Parameters: (None)
*
* Return:    Distance of the object from the Sun in AU as a double
**************************************************************/
Finds the distance of an object from the Sun in AU
Parameters: (None)

Distance of the object from the Sun in AU as a double
Finds the distance of an object from the Sun in AU Parameters : ( None ) Distance of the object from the Sun in AU as a double
double findAU()
{
  string buf;
  cout << "Enter orbital period in Earth years: ";
  cin >> buf; double period = atof(buf.c_str());
  return ( cbrt(pow(period, 2)) );
}
double findAU ( ) { string buf ; cout << " " ; cin >> buf ; double period = atof ( buf . c_str ( ) ) ; return ( cbrt ( pow ( period , 2 ) ) ) ; }
Purpose: Finds the distance of an object from the Sun in AU
Parameters: (None)
Purpose : Finds the distance of an object from the Sun in AU Parameters : ( None )
// uses buffer input method for safety // Kelper's 3rd Law of Planetary Motion: p² = a³ // ...becomes a = p⁽²ᐟ³⁾