Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main(void)
- {
- int x[10]={11,2,3,45,5,6,31,18,9,10};
- int aux, reserva, i, a=0;
- reserva=x[0];
- for(i=0; i<10; i++)
- {
- if (i == 9 )
- {
- x[a]= x[9];
- }
- else
- {
- aux= x[ i + 1];
- x[ i + 1]=reserva;
- reserva=aux;
- }
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement