Browse Source

added kg to ton converter

remotes/origin/develop
Sandro Welte 11 months ago
parent
commit
60744a93dd
  1. 6
      src/convert_kg_to_ton.c
  2. 13
      src/convert_kg_to_ton.h

6
src/convert_kg_to_ton.c

@ -0,0 +1,6 @@
#include "convert_kg_to_ton.h"
double kg_to_tons(double kilograms) {
return kilograms / 1000.0; // 1 ton = 1000 kilograms
}

13
src/convert_kg_to_ton.h

@ -0,0 +1,13 @@
#ifndef THEADMIRALS_CONVERT_KG_TO_TON_H
#define THEADMIRALS_CONVERT_KG_TO_TON_H
double kg_to_tons(double kilograms);
#endif //THEADMIRALS_CONVERT_KG_TO_TON_H
Loading…
Cancel
Save