Algoritmo a ordenar
Order the lines to iterate over an array of 5 integers and print each index with its value using a for loop.
Arrastra las lineas o usa los botones de flecha para reordenarlas. Cuando creas que estan en el orden correcto, tocas Verificar ordenamiento.
- 1
#include <stdio.h> - 2
int main() { - 3
int numbers[5] = {10, 20, 30, 40, 50}; - 4
int i; - 5
for (i = 0; i < 5; i = i + 1) { - 6
printf("Index %d -> %d\n", i, numbers[i]); - 7
} - 8
return 0; - 9
}
Ordena todas las lineas y despues toca Verificar ordenamiento.