mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 13:31:21 +03:00
Change for loop in gnome_sort.c, it's now C89-compatible
This commit is contained in:
parent
8eb6ef210c
commit
bbf8f1b991
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user