Browse Source

added type float to multiplication

remotes/origin/develop
Sandro Welte 11 months ago
parent
commit
7df5cef179
  1. 8
      src/convert_ton_to_kg.c
  2. 12
      src/convert_ton_to_kg.h

8
src/convert_ton_to_kg.c

@ -0,0 +1,8 @@
#include "convert_ton_to_kg.h"
double tons_to_kg(double tons) {
return tons * 1000.0; // 1 ton = 1000 kilograms
}

12
src/convert_ton_to_kg.h

@ -0,0 +1,12 @@
#ifndef THEADMIRALS_CONVERT_TON_TO_KG_H
#define THEADMIRALS_CONVERT_TON_TO_KG_H
double tons_to_kg(double tons);
#endif //THEADMIRALS_CONVERT_TON_TO_KG_H
Loading…
Cancel
Save