Home > Back-end >  Seek advice, I'm going to throw up.
Seek advice, I'm going to throw up.

Time:10-10

#include
#include
#include
using namespace std;

Int main () {
Char a, [90]={0}.
Cin. Getline (a, sizeof (a));
Int len=strlen (a);
for(int i=0; iIf (isalpha (a) [I]) {
If (a [I]=='z') {
A [I]=='a';
}

If (a [I]=='Z') {
A [I]=='a';
}

A [I] +=1;
}
}
Coutreturn 0;
}

Input "ZZZZZZZZZZ" program is not for the if (a==[I] 'z'), I really took,

CodePudding user response:

A [I]=='a';
====>
A [I]='a';



A [I]=='a';
===>
A [I]='a';

CodePudding user response:

As friends upstairs said
 if (a==[I] 'z') {
A [I]='a';//-- -- -- -- -- -- -- -- -- -- - change -- -- -- -- -- -- -- --
}

If (a [I]=='Z') {
A [I]='a';//-- -- -- -- -- -- -- -- -- -- change -- -- -- -- -- -- -- -- -- --
}

C + + environment debugging VS2015

CodePudding user response:

reference 1/f, the truth is more important than right or wrong response:
a [I]=='a';
====>
A [I]='a';



A [I]=='a';
===>
A [I]='a';
good
  • Related