src/Kepler3rdLaw.cpp
/*************************************************************
* Purpose: Finds the time for an object to orbit the Sun in Earth years
*
* Parameters: (None)
*
* Return:    Time for an object to orbit the Sun in Earth years as a double
**************************************************************/
Finds the time for an object to orbit the Sun in Earth years
Parameters: (None)

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