You are viewing a single comment's thread. Return to all comments →
#include <iostream> using namespace std; int main(){ int n,temp; cin>>n; int k[n]; for(int i=0;i<n;i++){ cin>>k[i]; } for(int i=0;i<n/2;i++){ temp=k[i]; k[i]=k[n-1-i]; k[n-1-i]=temp; } for(int i=0;i<n;i++){ cout<<k[i]<<" "; } return 0; }
Arrays Introduction
You are viewing a single comment's thread. Return to all comments →