Remove unused variables
This commit is contained in:
parent
4d981520fc
commit
751f80ef47
1
C/p027.c
1
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;
|
||||
|
||||
|
2
C/p051.c
2
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;
|
||||
|
||||
|
4
C/p059.c
4
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
C/p076.c
2
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;
|
||||
|
2
C/p206.c
2
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);
|
||||
|
||||
|
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user