From 27265fab4bc9d4b3404c8b2cc084396d71b6820a Mon Sep 17 00:00:00 2001 From: Leon Wolf Date: Thu, 8 Feb 2024 19:51:54 +0100 Subject: [PATCH] added convert cm into dm --- src/convert_cm_in_dm.c | 7 +++++++ src/convert_cm_in_dm.h | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 src/convert_cm_in_dm.c create mode 100644 src/convert_cm_in_dm.h diff --git a/src/convert_cm_in_dm.c b/src/convert_cm_in_dm.c new file mode 100644 index 0000000..4f0cf97 --- /dev/null +++ b/src/convert_cm_in_dm.c @@ -0,0 +1,7 @@ + +#include "convert_cm_in_dm.h" +#include + +double cm_to_dm(double cm) { + return cm / 10.0; +} diff --git a/src/convert_cm_in_dm.h b/src/convert_cm_in_dm.h new file mode 100644 index 0000000..eafecd9 --- /dev/null +++ b/src/convert_cm_in_dm.h @@ -0,0 +1,7 @@ + +#ifndef THEADMIRALS_CONVERT_CM_TO_DM_H +#define THEADMIRALS_CONVERT_CM_TO_DM_H + +double cm_to_dm(double cm); + +#endif //THEADMIRALS_CONVERT_CM_TO_DM_H