diff --git a/src/convert_ton_to_mt.c b/src/convert_ton_to_mt.c new file mode 100644 index 0000000..df74434 --- /dev/null +++ b/src/convert_ton_to_mt.c @@ -0,0 +1,7 @@ + +#include "convert_ton_to_mt.h" + + +double tons_to_megatons(double tons) { + return tons / 1000000.0; // 1 megaton = 1,000,000 tons +} diff --git a/src/convert_ton_to_mt.h b/src/convert_ton_to_mt.h new file mode 100644 index 0000000..331c20b --- /dev/null +++ b/src/convert_ton_to_mt.h @@ -0,0 +1,13 @@ + +#ifndef THEADMIRALS_CONVERT_TON_TO_MT_H +#define THEADMIRALS_CONVERT_TON_TO_MT_H + + + + +double tons_to_megatons(double tons); + + + + +#endif //THEADMIRALS_CONVERT_TON_TO_MT_H