diff --git a/c/resistor-color-duo/src/resistor_color_duo.c b/c/resistor-color-duo/src/resistor_color_duo.c index 7bed2be..73314ea 100644 --- a/c/resistor-color-duo/src/resistor_color_duo.c +++ b/c/resistor-color-duo/src/resistor_color_duo.c @@ -4,10 +4,9 @@ #include #endif -resistor_band_t color_code(resistor_band_t *colors) +resistor_band_t color_code(resistor_band_t colors[static 2]) { resistor_band_t c1=*colors, c2=*(colors+1); - return c1>=BLACK && c1<=WHITE && c2>=BLACK && c2<=WHITE? c1*10+c2: ERROR; } @@ -19,7 +18,7 @@ int main(int ac, char **av) for (; arg #include /* We will choose to use a board of (X,Y) squares, with the sizes of the 2 diff --git a/c/two-bucket/two_bucket.h b/c/two-bucket/two_bucket.h index fca0cfd..8d31866 100644 --- a/c/two-bucket/two_bucket.h +++ b/c/two-bucket/two_bucket.h @@ -22,6 +22,6 @@ bucket_result_t measure(bucket_liters_t bucket_1_size, bucket_liters_t goal_volume, bucket_id_t start_bucket); -#include "br-common.h" - #endif /* TWO_BUCKETS_H */ + +#include "br-common.h" diff --git a/c/word-count/src/word_count.c b/c/word-count/src/word_count.c index f30e99b..45c9cb5 100644 --- a/c/word-count/src/word_count.c +++ b/c/word-count/src/word_count.c @@ -18,10 +18,10 @@ * The following will return INVALID_WORD: * P2P * 0xFF - * A'2 + * A''B * The following will return 2 numbers/words: * 1'2 - * A''B + * A'2 */ /* get next word in string