No offence, but this is next to useless...
Buuuuut, if you want to improve it, here are some suggestions:
1. Fix it so it doesn't accept non-integer values as input.
2. Give it a GUI, ugly DOS box is ugly

3. Make it convert liters to gallons too!
Try making things people (yourself included) will USE if you want a warmer reception if you release something in the future. I wrote this with no effort : |
Code:
#include <iostream>
void fConvert(int x, float y);
int main(){
int inputo;
float inputt;
std::cout << "[1]Liters -> Gallons\n[2]Gallons -> Liters\n";
std::cin >> inputo;
std::cout << "Value to convert: ";
std::cin >> inputt;
fConvert(inputo,inputt);
system("PAUSE");
return 0;
}
void fConvert(int x, float y){
if(x == 1){
std::cout << "\n" << (y*0.264) << "\n";
}
if(x == 2){
std::cout << "\n" << (y*3.785) << "\n";
}
}