Merge pull request #252 from gbrunofranco/gnome_sort

Fix for loop in gnome_sort to make it C89-compatible
This commit is contained in:
StephenCurry 2019-08-10 07:32:25 -05:00 committed by GitHub
commit 850c001a99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,8 @@ void sort(int *numbers, int size)
void display(int *array, int n)
{
for (int i = 0; i < n; ++i)
int i;
for (i = 0; i < n; ++i)
printf("%d ", array[i]);
printf("\n");
}