Please help its urgent i wrote this program but the output is not right. The program is not inversing the order of the words in the string. for example: input: i love school
output: school love i . Please help thanks
#include<iostream.h>
#include<string>
using namespace std;
main() {
std::cout << "Please enter a sequence of words: ";
std::string y; // read words and write them one per line
char lcv;
void reverseArrayElement( string data[], int begin, int end); // reverse the elements of a string array
while(cin >> y) {
std::cout << y[lcv] << endl;}
// begin is the index of the first element in the range to be reversed, and end is the index after the last element in the range
system("Pause");
}