I used push_back(elements) and reversed the vector later. Is there any way to do it in a straight forward way?
void main() {
vector<int> arr;
int input,size = 0 ;
for(int i=0; i<size; i++) {
cin >> input;
arr.push_back(input);
}
reverse(arr.begin(), arr.end());
}