Hi everyone. When I run this code in Xcode it works as it is supposed to. When my friend runs it in Visual Studio, the program gets the phrase from the user but then immediately closes. In particular, when my friend runs this code neither the phrase in the if block nor the else if block is printed to the screen. Is there something in my friend's Visual Studio settings that is causing this?
#include <iostream>
#include <string>
usingnamespace std;
int main () {
int dummy;
string x;
int y;
cout<<"Please insert a phrase.";
cin>>x;
cout<<x;
y = x.length();
if (y <= 3)
cout<<"Your phrase started with a short word.";
elseif (y > 3)
cout<<"Your phrase started with a long word.";
cin>>dummy;
return 0;
}