#include <iostream>using namespace std;int main()
{for(char bigger_man='A';bigger_man<='D';bigger_man++)
{int count=0;
if (bigger_man!='A') count++;
if(bigger_man=='B') count++;
if(bigger_man=='C') count++;
if(bigger_man!='D') count++;
if(count==3)
cout<<bigger_man<<endl;
}
}
2 回答
已采纳
![?](http://img1.sycdn.imooc.com/56259c1c0001635101000100-100-100.jpg)
qq_小朱
TA贡献28条经验 获得超18个赞
#include <iostream> using namespace std; int main() { for(char bigger_man='A'; bigger_man<='D'; bigger_man++) { int count=0; if (bigger_man!='A') count++; if(bigger_man=='B') count++; if(bigger_man=='C') count++; if(bigger_man!='D') count++; if(count==3) cout<<bigger_man<<endl; } return 0; }
- 2 回答
- 0 关注
- 1087 浏览
添加回答
举报
0/150
提交
取消