#include<stdio.h>
#include<ctype.h>
void Fp(const char *str)
{
int a=0;
while(*str != '\0')
{
if (isalpha(*str))
{
if(*str=='A')
printf("X");
if(*str=='B')
printf("Y");
if(*str=='C');
printf("Z");
if(*str=='a')
printf("x");
if(*str=='b')
printf("y");
if(*str=='c')
printf("z");
else
printf("%c",*str-3);
}
else
printf("%c",*str);
*str++;
}
}
int main(void){
char a[1000];
gets(a);
Fp(a);
return 0;
}
为什么我加了判断语句后会输出会多出字符?如何改正