哪位大佬能帮我看看这串代码出了什么问题,谢。。
字符串小写变大写
#include<bits/stdc++.h> using namespace std; int ans=0; string str; int main(){ getline(cin,str); for(auto&x:str) if(x>='a'&&x<='z'){ x-=32; }else if(x>='A'&&x<='Z'){ x+=32; } cout<<ans; }