Răspuns:
#include <iostream>
using namespace std;
int main()
{
int n,i,j,x;
do
{
cout<<"n=";
cin>>n;
}while(n%2!=0);
int a[n];
for(i=1;i<=n;i++)
{
cout<<"a["<<i<<"]=";
cin>>a[i];
}
x=a[1];
for(i=1;i<n;i++)
a[i]=a[i+1];
a[n]=x;
for(i=1;i<=n;i++)
cout<<a[i]<<" ";
return 0;
}
Explicație:
Multumesc+5*+cel mai inteligent raspuns?