main()
stuff
while(1)
{
cin >> answer;
if( (answer == 'y') || (answer = 'Y') )
do your stuff;
else if ( (answer =='q') || (answer == 'Q'))
break;
else
cout << "invalid response";
}
cout << "ciao"
end
stuff
while(1)
{
cin >> answer;
if( (answer == 'y') || (answer = 'Y') )
do your stuff;
else if ( (answer =='q') || (answer == 'Q'))
break;
else
cout << "invalid response";
}
cout << "ciao"
end