Using Splashkit create a conversion equation code

Hey, I'm new too C++ so I have a pretty simple question I guess.

How do you make the program that converts litres to gallons and gallons to liters on the visual studio code?

In this type of format-

int main(){
int x;
5 = 2+x;
return x;
}

Last edited on
I would just make conversion factor constants, and go from there...

roughly

const double g2l = 3.785411784;
const double l2g = 1.0/g2l;

then
1) get input on what conversion to do from user
2) get value
3) if direction is g2l write value*g2l, if direction is l2g write l2g*value

Topic archived. No new replies allowed.