C++ examples for Data Type:float
Converts gallons to cubic feet
#include <iostream> using namespace std; int main()/*from w ww.j av a 2 s . c o m*/ { float gallons, cufeet; cout << "\nEnter quantity in gallons: "; cin >> gallons; cufeet = gallons / 7.481; cout << "Equivalent in cublic feet is " << cufeet << endl; return 0; }