PDA

View Full Version : Gallon To Liter Converter[C++]



SonniE
05-26-2008, 01:13 PM
i fixed this source up to work with vista and xp better
if you would like to try the compiled version click HERE (http://www.megaupload.com/?d=M2YS2WST)


//Based off of McGraw-HiLL's Gallons to liter converter Edited By SonniE (WWW.codinghs.COM)

#include <iostream>
using namespace std;
int main()
{
double gallons, liters;
cout << "Enter number of gallons: ";
cin >> gallons;
liters = gallons * 3.7854; // convert to liters
cout << "Liters: " << liters << "\n";
system("PAUSE");
return 0;
}

xr34p3rx
05-27-2008, 05:07 PM
nice code man these are the codes u should go by to learn