Converts gallons to cubic feet - C++ Data Type

C++ examples for Data Type:float

Description

Converts gallons to cubic feet

Demo Code

#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;
}

Result


Related Tutorials