exercism/c/resistor-color/resistor_color.c

8 lines
262 B
C

#include "resistor_color.h"
static const resistor_band_t bandColors[] = {
BLACK, BROWN, RED, ORANGE, YELLOW, GREEN, BLUE, VIOLET, GREY, WHITE};
int color_code(resistor_band_t color) { return color; }
const resistor_band_t *colors() { return bandColors; }