For each of these units, write a function that takes an argument (the original value) and returns the converted value:
float TonnesToKilograms(float tonnes)
{
return tonnes * 1000;
}
And, whenever you need to do a conversion in your application, just call one of these functions like this:
int kg = TonnesToKilograms(1.5);