diff --git a/src/convert_kg_to_g.c b/src/convert_kg_to_g.c new file mode 100644 index 0000000..92bdd70 --- /dev/null +++ b/src/convert_kg_to_g.c @@ -0,0 +1,6 @@ + +#include "convert_kg_to_g.h" + +double kg_to_gram(double kilograms) { + return kilograms * 1000.0; // 1 kilogram = 1000 grams +} diff --git a/src/convert_kg_to_g.h b/src/convert_kg_to_g.h new file mode 100644 index 0000000..707a161 --- /dev/null +++ b/src/convert_kg_to_g.h @@ -0,0 +1,13 @@ + + +#ifndef THEADMIRALS_CONVERT_KG_TO_G_H +#define THEADMIRALS_CONVERT_KG_TO_G_H + + + + +double kg_to_gram(double kilograms); + + + +#endif //THEADMIRALS_CONVERT_KG_TO_G_H