I want to invert an array, for example:
void exercicio5()
{
float array[6] = {10.1, 11.2, 12.3, 127.0, 512.17, -2.5};
float inverso[6];
int cont, x = 6;
for (cont = 0; cont < 6; cont++)
{
x--;
inverso[x] = array[cont];
printf(" %.2f \n ", inverso[x]);
}
}
I have done so, so it is not reversing it just shows the array values and does not reverse them, how can I solve this problem?