![]() |
#2
果汁呵呵2007-07-31 14:29
|
#include <iostream>
using namespace std;
int main ()
{
char ans;
do
{
cout<<"Hello\n";
cout<<"Do you want another greeting?\n"
<<"Press y for yes, n for no,\n"
<<"and then press return:";
cin>>ans;
}while (ans =='y' -- ans=='Y');
cout<< "Good-Bye\n";
return 0;
}
--那里使用逻辑或操作符‖