summaryrefslogtreecommitdiff
path: root/1
diff options
context:
space:
mode:
Diffstat (limited to '1')
-rw-r--r--1/part1.c4
-rw-r--r--1/part2.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/1/part1.c b/1/part1.c
index f4e5d43..62ef852 100644
--- a/1/part1.c
+++ b/1/part1.c
@@ -5,7 +5,7 @@
#define INPUT_LEN 200
-int repair(int * arr)
+int repair(const int * arr)
{
for (int i = 0; i < INPUT_LEN; i++) {
for (int j = 0; j < INPUT_LEN; j++) {
@@ -20,7 +20,7 @@ int repair(int * arr)
int main()
{
- FILE * file = fopen("input", "r");
+ FILE *file = fopen("input", "r");
char buffer[8] = { 0 };
int input[INPUT_LEN] = { 0 };
diff --git a/1/part2.c b/1/part2.c
index 3fb06a6..6efb387 100644
--- a/1/part2.c
+++ b/1/part2.c
@@ -5,7 +5,7 @@
#define INPUT_LEN 200
-int repair(int * arr)
+int repair(const int *arr)
{
for (int i = 0; i < INPUT_LEN; i++) {
for (int j = 0; j < INPUT_LEN; j++) {
@@ -22,7 +22,7 @@ int repair(int * arr)
int main()
{
- FILE * file = fopen("input", "r");
+ FILE *file = fopen("input", "r");
char buffer[8] = { 0 };
int input[INPUT_LEN] = { 0 };
@@ -31,7 +31,7 @@ int main()
input[i] = atoi(buffer);
}
- fclose(file)
+ fclose(file);
printf("%i", repair(input));
}