各位大侠帮我改下错
下面程序是要求当输入7时结束,可是为什么我输入7后没有结束呢?大侠们帮帮忙# include <iostream>
int main()
{using namespace std;
int n;
cout<<"Enter numbers in the range 1-10 to find";
cout<<"my favorite number\n";
do
{ cin>>n;
}while(n!=7);
cout<<"Yes,7 is my favorite.\n";
system("pause");
return 0;
}