C++ code not asking for input despite cin

using namespace std;
int main() {
string previous ="";
string current;
while (cin>>current){
if (previous==current)
cout<<“Repeated Word:”
return 0;

The above code does not ask for any input which I expect as the program contains cin. Also, all it shows is successfully executed. Without asking for any input, how that can be?