You are viewing a single comment's thread. Return to all comments →
include iostream
int main() { int n; std::cin>>n; const int SIZE = n; int numbers[SIZE];
for (int i = 0; i < n; ++i) { std::cin >> numbers[i]; } for (int i=0; i<n/2 ; ++i){ int temp =numbers[i]; numbers[i]=numbers[n-1-i]; numbers[n-1-i]=temp; } for(int i= 0; i< n; ++i){ std::cout<<numbers[i]<<" "; } return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays Introduction
You are viewing a single comment's thread. Return to all comments →
include iostream
int main() { int n; std::cin>>n; const int SIZE = n; int numbers[SIZE];
}