How can you do at the same time
The input string
Will be converted to uppercase lowercase letters, and ignore other types of characters
The inverse output
I added the if statement and inverse output isn't there a problem
But running failure
Hope leaders help me to point out and correct mistakes
CodePudding user response:
C no initial value
CodePudding user response:
reference 1/f, don't know what kind of name, reply: c without the initial value What about how to let him have the initial value CodePudding user response:
You write programs have a problem, the initial value with assignment of cin CodePudding user response:
Why not send code, so we change I wonder whether you are using the wrong order to write Input, and then judge # include & lt; Bits/stdc++. H> using namespace std; Int main () { String s; cin> s; Int len=s.s considering (); for(int i=0; i { If (s [I] & gt;='a' & amp; & S [I] <='z') S=s [I] [I] - 'a' + 'a'; Else if (s [I] & gt;='A' & amp; & S [I] <='Z') S=s [I] [I] - 'A' + 'A'; } For (int I=len - 1; I>=0; - I) cout return 0; } CodePudding user response:
The reference 4 floor x_miracle reply: why not send code, so we change I wonder whether you are using the wrong order to write Input, and then judge # include & lt; Bits/stdc++. H> using namespace std; Int main () { String s; cin> s; Int len=s.s considering (); for(int i=0; i { If (s [I] & gt;='a' & amp; & S [I] <='z') S=s [I] [I] - 'a' + 'a'; Else if (s [I] & gt;='A' & amp; & S [I] <='Z') S=s [I] [I] - 'A' + 'A'; } For (int I=len - 1; I>=0; - I) cout return 0; } Oh thank you! Thank you very much I see next time