[求助]一个简单的程序
#include <iostream.h>void main()
{
char my[3];
cout << "请输入三个字符:\n";
cin >> my;
if (my[0]=='a' && my[1]=='b' && my[2]=='c')
cout << "情况abc\n";
else if (my[0]=='e' && my[1]=='f' && my[2]=='g')
cout << "情况efg\n";
else if (my[0]=='h' && my[1]=='i' && my[2]=='j')
cout << "情况hij\n";
else
cout << "没有符合的情况!\n";
}
------------------------------------------------------------------------------------------------------------------------------------
以上程序用switch代替if,怎么写?就是switch()里面的条件不知咋写的?