Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
37586 | linshuyu | 忽略大小写的字符串比较 | C++ | 编译错误 | 0 MS | 0 KB | 675 | 2024-01-21 20:23:08 |
#include <bits/stdc++.h> using namespace std; int main(){ char a[79], b[79]; gets(a); gets(b); strlwr(a); strlwr(b); int flag = 0; for(int i = 0; i < min(strlen(a), strlen(b)); i++){ if(a[i] == b[i]){ flag = 1; }else if(a[i] > b[i]){ flag = 2; }else{ flag = 3; } } if(flag == 1){ cout << "="; }else if(flag == 2){ cout << ">"; }else{ cout << "<"; } return 0; }