diff --git a/1/1-1.c b/1/1-1.c index 6ebb892..56afba7 100644 --- a/1/1-1.c +++ b/1/1-1.c @@ -6,8 +6,8 @@ int main(int argc, char const *argv[]) { FILE *p_file = fopen("input", "r"); char line[50]; - uint increases = 0; - uint previous_depth = 0; + unsigned int increases = 0; + unsigned int previous_depth = 0; while (fgets(line, sizeof line, p_file) != NULL) { if (atoi(line) > previous_depth) diff --git a/1/1-2.c b/1/1-2.c index 4a0bc64..5f69cdf 100644 --- a/1/1-2.c +++ b/1/1-2.c @@ -8,8 +8,8 @@ typedef struct { - uint sum; - uint count; + unsigned int sum; + unsigned int count; bool written; // IGNORE COMPARISONS AT THE START. } MEASUREMENT_WINDOW; @@ -17,14 +17,14 @@ int main(int argc, char const *argv[]) { FILE *p_file = fopen("input", "r"); char line[50]; - uint increases = 0; + unsigned int increases = 0; MEASUREMENT_WINDOW windows[N_WINDOWS]; - uint i = 0; + unsigned int i = 0; while (fgets(line, sizeof line, p_file) != NULL) { - uint n = atoi(line); + unsigned int n = atoi(line); // UPDATE MEASURING WINDOWS for (size_t j = 0; j < N_WINDOWS; j++) { diff --git a/3/3-1.c b/3/3-1.c index fea17e2..71fd2ab 100644 --- a/3/3-1.c +++ b/3/3-1.c @@ -7,8 +7,8 @@ int main(int argc, char const *argv[]) { FILE *p_file = fopen("input", "r"); - uint n_one[WIDTH] = {0}; - uint length = 0; + unsigned int n_one[WIDTH] = {0}; + unsigned int length = 0; char line[WIDTH + 2]; while (fgets(line, sizeof line, p_file) != NULL) @@ -24,8 +24,8 @@ int main(int argc, char const *argv[]) } // GET GAMMA/EPSILON - uint gamma = 0, epsilon = 0; - uint place = 1; + unsigned int gamma = 0, epsilon = 0; + unsigned int place = 1; for (size_t i = WIDTH; i--;) { if (n_one[i] > length / 2) diff --git a/3/3-2.c b/3/3-2.c index 64abf82..362eb83 100644 --- a/3/3-2.c +++ b/3/3-2.c @@ -67,8 +67,8 @@ LIST *read_file(char *path) char common_value(LIST *list, char index) { - uint one = 0; - uint zero = 0; + unsigned int one = 0; + unsigned int zero = 0; for (size_t i = 0; i < list->size; i++) { if (list->list[i][index] - '0')