0

Hello World!
i wrote this code for fliping the array , but it doesn't work ...
why can anyone say me ? what i did wrong?
array and i,n variable are already global declared.

void exb(void)
{
    int aux;
    for(i=0;i<(n-1)/2;i++)
    {
        aux=x[i];
        x[i]=x[n-1-i];
        x[n-1-i]=aux;
    }
}

thanks :)

Edited by thendrluca: n/a

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by Adak
0

Describe your array, and which way you want to "flip" it - Rotate it 90° clockwise or counter-clockwise, or along a particular axis (specify which one). A 3 X 3 example of the array before and after the flip, would be great.

Use code tags around the example, or it will be mangled by the forum software.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.