C++ Function Definition inline functions
#include <iostream> using namespace std; // converts pounds to kilograms inline float lbstokg(float pounds) { return 0.453592 * pounds; } int main()//from w w w.ja va 2 s. c om { float lbs; cout << "\nEnter your weight in pounds: "; cin >> lbs; cout << "Your weight in kilograms is " << lbstokg(lbs) << endl; return 0; }