标签:
扶老奶奶过街
#include <cstdio> int main() { int aa; int flag =0; for(int i=0; i< 5;i++) { char ch=‘A‘+ i; int logical= (ch != ‘A‘ && ch != ‘E‘)+ (ch ==‘C‘ || ch==‘E‘) + (ch ==‘C‘ || ch== ‘D‘)+ (ch!= ‘C‘ && ch!= ‘B‘) + (ch!=‘E‘); if(logical == 2) { if(flag) { printf(" "); } printf("%c", ‘A‘+ i); flag =1; } } return 0; }
标签:
原文地址:http://www.cnblogs.com/fengshun/p/5463404.html