From bfa3738c166fcef5e898d251c22a8e683f4236b2 Mon Sep 17 00:00:00 2001 From: Leon Wolf Date: Thu, 8 Feb 2024 19:00:19 +0100 Subject: [PATCH] convert M in KM --- src/convert_M_in_KM.c | 7 +++++++ src/convert_M_in_KM.h | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 src/convert_M_in_KM.c create mode 100644 src/convert_M_in_KM.h diff --git a/src/convert_M_in_KM.c b/src/convert_M_in_KM.c new file mode 100644 index 0000000..66ef45a --- /dev/null +++ b/src/convert_M_in_KM.c @@ -0,0 +1,7 @@ + +#include "convert_M_in_KM.h" +#include + +double meter_to_kilometer(double meter) { + return meter / 1000.0; +} diff --git a/src/convert_M_in_KM.h b/src/convert_M_in_KM.h new file mode 100644 index 0000000..9dc3232 --- /dev/null +++ b/src/convert_M_in_KM.h @@ -0,0 +1,7 @@ + +#ifndef THEADMIRALS_CONVERT_M_IN_KM_H +#define THEADMIRALS_CONVERT_M_IN_KM_H + +double meter_to_kilometer(double meter); + +#endif //THEADMIRALS_CONVERT_M_IN_KM_H