大家帮我改个错
大家看看我这个怎么回事,写个简单的选择题,但是如果不选c p t q的话程序要一直提示重新输入,但是我写不出来,试过加循环,但是不知道怎么加好,哪位高手能告诉我怎么加个循环# include <iostream>
int main()
{using namespace std;
cout<<"Please enter one of the following choices:";
cout<<"c)carnivore\t"<<"p)paianist"
<<"t)tree\t"<<"q)game";
char ch;
cout<<"please enter c,p,t or q:";
cin>>ch;
switch(ch)
{ case 'c' : cout<<"A maple is carnivore\t";
break;
case 'p' : cout<<"A maple is paianist\v";
break;
case 't' : cout<<"A maple is tree\t";
break;
case 'q' : cout<<"A maple is game\v";
break;
default : cout<<"please enter a c,p,t or q:";
}
system("pause");
return 0;
}