Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
144689 马俊潇 07大小写转换 C++ Compile Error 0 MS 0 KB 232 2026-01-24 15:38:35

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ char a,b=0; cin>>a; if(a>="A"&&a<="Z"){ b=b+a+32; cout<<b;}else if(a>="a"&&a<="z"){ b=b+a-32; cout<<b;} return 0;}


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:9: warning: comparison with string literal results in unspecified behaviour [-Waddress]
   if(a>="A"&&a<="Z"){
         ^
Main.cc:6:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
Main.cc:6:17: warning: comparison with string literal results in unspecified behaviour [-Waddress]
   if(a>="A"&&a<="Z"){
                 ^
Main.cc:6:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
Main.cc:8:23: warning: comparison with string literal results in unspecified behaviour [-Waddress]
   cout<="a"&&a<="z"){
                       ^
Main.cc:8:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
Main.cc:8:31: warning: comparison with string literal results in unspecified behaviour [-Waddress]
   cout<="a"&&a<="z"){
                               ^
Main.cc:8:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]