With c++ (and other languages) for each variable/string you want to output, you must have a concatenation operator between them.
With c++ it's "<<" for outputs. With PHP it's ".", with C# it's "+".
Your code is correct, just the line which outputs the text has one small error.
if (x > y)
cout << x << "is the greater variable" ;
cout << y << "is the greater variable" ;
I've bolded and underlined the code which would fix it.