Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
44231 | chenyanda | 忽略大小写的字符串比较 | C++ | Accepted | 1 MS | 256 KB | 384 | 2024-03-29 15:40:43 |
#include<bits/stdc++.h> using namespace std; int main() { char a[85],b[85]; gets(a); gets(b); for(int i=0;i<strlen(a);i++){ if(a[i]>='A'&&a[i]<='Z'){ a[i]+=32; } } for(int i=0;i<strlen(b);i++){ if(b[i]>='A'&&b[i]<='Z'){ b[i]+=32; } } if(strcmp(a,b)==0){ cout<<"="; } else if(strcmp(a,b)>0){ cout<<">"; } else{ cout<<"<"; } }