Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82492 石晋骁 31忽略大小写的字符串比较 C++ Compile Error 0 MS 0 KB 525 2024-07-13 11:43:39

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ srting a; srting b; int al,bl; getline(cin,a); getline(cin,b); al = a.size(); bl = b.size(); for(int i =0;i < al;i++){ if(a[i] >= 'A' && a[i] <= 'Z'){ a[i] = a[i]+32; } } for(int j =0;j < bl;j++){ if(b[j] >= 'A' && b[j] <= 'Z'){ b[j] = b[j]+32; } } if(a > b){ cout << ">"; return 0; }else if(a < b ){ cout << "<"; return 0; }else{ cout << "="; return 0; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:2: error: 'srting' was not declared in this scope
  srting a;
  ^
Main.cc:5:12: error: expected ';' before 'b'
     srting b;
            ^
Main.cc:7:14: error: 'a' was not declared in this scope
  getline(cin,a);
              ^
Main.cc:8:14: error: 'b' was not declared in this scope
  getline(cin,b);
              ^