I fixed a few things in your code, I'm not sure if you were using the loop for the assignment but it wasn't need for a conversion..
Things you were doing wrong:
1. You were changing the gallon value rather than the litre.
2. You were missing a semicolon.
3. You were showing the gallons under the litre
heres the new code:
CODE
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
const int MAXGALLON = 20;
const int STARTVAL = 10;
const int STEPSIZE = 1;
int litre, gallon;
double count, total;
cout << "LITRE GALLON\n" << "----- ------\n";
gallon = STARTVAL;
cout << setiosflags(ios::showpoint) << setiosflags(ios::fixed) << setprecision(2);
litre = gallon * 3.785;
cout << setw(4) << litre << setw(6) << gallon << endl;
system ("pause");
return 0;
}
Good Luck!