diff --git a/C/p027.c b/C/p027.c index 2487739..bc03a5a 100644 --- a/C/p027.c +++ b/C/p027.c @@ -26,7 +26,6 @@ int main(int argc, char **argv) { int a, b, n, p, count, max = 0, save_a, save_b; - int *primes; double elapsed; struct timespec start, end; diff --git a/C/p051.c b/C/p051.c index 72eb504..5115133 100644 --- a/C/p051.c +++ b/C/p051.c @@ -23,7 +23,7 @@ int *primes; int main(int argc, char **argv) { - int i, found = 0; + int i; double elapsed; struct timespec start, end; diff --git a/C/p059.c b/C/p059.c index e3309a2..6be47b6 100644 --- a/C/p059.c +++ b/C/p059.c @@ -110,7 +110,7 @@ int main(int argc, char **argv) * the right key was likely found.*/ if(strstr(plain_text, "the") != NULL && strstr(plain_text, "be") != NULL && strstr(plain_text, "to") != NULL && strstr(plain_text, "of") != NULL && - strstr(plain_text, "and") != NULL & strstr(plain_text, "in") != NULL && + strstr(plain_text, "and") != NULL && strstr(plain_text, "in") != NULL && strstr(plain_text, "that") != NULL && strstr(plain_text, "have") != NULL) { sum = 0; @@ -122,7 +122,7 @@ int main(int argc, char **argv) } found = 1; - printf("%c%c%c\n", c1, c2, c3); +// printf("%c%c%c\n", c1, c2, c3); } } } diff --git a/C/p076.c b/C/p076.c index cb9e18f..664111d 100644 --- a/C/p076.c +++ b/C/p076.c @@ -16,7 +16,7 @@ int main(int argc, char **argv) { - int i, n; + int n; long int *partitions; double elapsed; struct timespec start, end; diff --git a/C/p206.c b/C/p206.c index 6cccf8c..47e6360 100644 --- a/C/p206.c +++ b/C/p206.c @@ -52,7 +52,7 @@ int main(int argc, char **argv) elapsed = (end.tv_sec - start.tv_sec) + (double)(end.tv_nsec - start.tv_nsec) / 1000000000; printf("Project Euler, Problem 206\n"); - printf("Answer: %d\n", n); + printf("Answer: %ld\n", n); printf("Elapsed time: %.9lf seconds\n", elapsed); diff --git a/C/projecteuler.c b/C/projecteuler.c index acf8653..da72f6d 100644 --- a/C/projecteuler.c +++ b/C/projecteuler.c @@ -316,7 +316,7 @@ void insertion_sort(void **array, int l, int r, int (*cmp)(void *lv, void *rv)) int partition(void **array, int l, int r, int (*cmp)(void *lv, void *rv)) { int i = l -1, j = r; - void *pivot, *tmp; + void *pivot; /* Arbitrarily selecting the rightmost element as pivot.*/ pivot = array[r];