[求助]此程序的风格有哪些缺点?
#include <stdio.h>
#include <iostream.h>
int main(int argc, char *argv[])
{
char booly();
cout<<booly()<<endl;
return 0;
}
char booly()
{
char Y;
cout<<"请选择 Y/N"<<endl;
cin>>Y;
switch (Y){
case 'Y':
cout<<"Y"<<endl;
break;
case 'N':
cout<<"N"<<endl;
break;
default:
cout<<"输入错误"<<endl;
break;
}
getchar();
}