diff --git a/src/convert_g_to_mg.c b/src/convert_g_to_mg.c new file mode 100644 index 0000000..a7c17ad --- /dev/null +++ b/src/convert_g_to_mg.c @@ -0,0 +1,6 @@ + +#include "convert_g_to_mg.h" + +double g_to_mg(double grams) { + return grams * 1000.0; // 1 gram = 1000 milligrams +} diff --git a/src/convert_g_to_mg.h b/src/convert_g_to_mg.h new file mode 100644 index 0000000..557244a --- /dev/null +++ b/src/convert_g_to_mg.h @@ -0,0 +1,13 @@ + +#ifndef THEADMIRALS_CONVERT_G_TO_MG_H +#define THEADMIRALS_CONVERT_G_TO_MG_H + + + + + +double g_to_mg(double grams); + + + +#endif //THEADMIRALS_CONVERT_G_TO_MG_H