Change for loop in gnome_sort.c, it's now C89-compatible

This commit is contained in:
Gabriele Bruno Franco 2019-08-10 13:19:05 +02:00
parent 8eb6ef210c
commit bbf8f1b991

View File

@ -31,9 +31,10 @@ void display(int *array, int n)
int main()
{
int size = 6;
int i;
int *numbers = malloc(size*sizeof(int));
printf("Insert %d unsorted numbers: \n", size);
for (int i = 0; i < size; ++i)
for (i = 0; i < size; ++i)
scanf("%d", &numbers[i]);
printf("Initial array: ");
display(numbers, size);