Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MaratB/6664180 to your computer and use it in GitHub Desktop.
Save MaratB/6664180 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <conio.h>
const int N=6;
main()
{
int i, c, A[N];
for (i=0; i<N; i++)
{
printf("Enter A[%d]: ", i);
scanf("%d", &A[i]);
}
for (i=0; i<N/2; i++)
{
c=A[i];
A[i]=A[N-1-i];
A[N-1-i]=c;
}
for (i=0; i<N; i++)
printf("\nA[%d]= %d\n", i, A[i]);
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment