Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
41034 ningyouran 字符大小写转换 C++ Accepted 0 MS 252 KB 270 2024-02-18 17:57:49

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main(){ char a[110],i; cin>>a; for( i=0;i<strlen(a);i++){ if(a[i]>='a'&&a[i]<='z'){ a[i]-=32; cout<<a[i]; } else if(a[i]>='A'&&a[i]<='Z'){ a[i]+=32; cout<<a[i]; } } return 0; }


Judgement Protocol: