diff options
author | Andinus <andinus@nand.sh> | 2021-08-11 15:26:15 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-08-11 15:26:15 +0530 |
commit | 321825828ac918bad28d0597a8616c6dc9802c3c (patch) | |
tree | 0b8e9cb1012197750eb58e972736319b2a6abac2 /c/resistor-color/src/resistor_color.c | |
parent | 2979ef790ac5b8f58495e0dd08cafd6a3a2e30a5 (diff) | |
download | exercism-321825828ac918bad28d0597a8616c6dc9802c3c.tar.gz |
Add solved exercises
Diffstat (limited to 'c/resistor-color/src/resistor_color.c')
-rw-r--r-- | c/resistor-color/src/resistor_color.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/c/resistor-color/src/resistor_color.c b/c/resistor-color/src/resistor_color.c new file mode 100644 index 0000000..ee85f6e --- /dev/null +++ b/c/resistor-color/src/resistor_color.c @@ -0,0 +1,13 @@ +#include "resistor_color.h" + +static resistor_band_t bands[] = { + BLACK, BROWN, RED, ORANGE, YELLOW, GREEN, BLUE, VIOLET, GREY, WHITE +}; + +int color_code(resistor_band_t color) { + return color; +} + +const resistor_band_t* colors(void) { + return bands; +} |