diff --git a/src/convert_ton_to_kg.c b/src/convert_ton_to_kg.c new file mode 100644 index 0000000..32b0f60 --- /dev/null +++ b/src/convert_ton_to_kg.c @@ -0,0 +1,8 @@ + +#include "convert_ton_to_kg.h" + + + +double tons_to_kg(double tons) { + return tons * 1000.0; // 1 ton = 1000 kilograms +} diff --git a/src/convert_ton_to_kg.h b/src/convert_ton_to_kg.h new file mode 100644 index 0000000..45a1b58 --- /dev/null +++ b/src/convert_ton_to_kg.h @@ -0,0 +1,12 @@ + + +#ifndef THEADMIRALS_CONVERT_TON_TO_KG_H +#define THEADMIRALS_CONVERT_TON_TO_KG_H + + + +double tons_to_kg(double tons); + + + +#endif //THEADMIRALS_CONVERT_TON_TO_KG_H