From df6e7fe12d669b5355de1b32000194a8ec2cd6b2 Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Thu, 8 Feb 2024 17:46:19 +0100 Subject: [PATCH] add converter kph to mps --- src/convert_kph_to_mps.c | 6 ++++++ src/convert_kph_to_mps.h | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 src/convert_kph_to_mps.c create mode 100644 src/convert_kph_to_mps.h diff --git a/src/convert_kph_to_mps.c b/src/convert_kph_to_mps.c new file mode 100644 index 0000000..02b5c60 --- /dev/null +++ b/src/convert_kph_to_mps.c @@ -0,0 +1,6 @@ +#include "convert_kph_to_mps.h" + +double converter_kph_to_mps(double kph){ + double speed = kph / 3.6; + return speed; +} \ No newline at end of file diff --git a/src/convert_kph_to_mps.h b/src/convert_kph_to_mps.h new file mode 100644 index 0000000..467bc72 --- /dev/null +++ b/src/convert_kph_to_mps.h @@ -0,0 +1,6 @@ +#ifndef THEADMIRALS_CONVERT_KPH_TO_MPS_H +#define THEADMIRALS_CONVERT_KPH_TO_MPS_H + +double converter_kph_to_mps(double kph); + +#endif //THEADMIRALS_CONVERT_KPH_TO_MPS_H