// sd.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<ctype.h>
int main(int argc, char* argv[])
{
char str[100];
printf("请输入一个字符串:\n");
scanf("%s",&str);
printf("下面是输出的结果:\n");
for (int i = 0; str[i]; i++) {
if (isalpha(str[i])) {
if (isupper(str[i])) {
printf("%c", tolower(str[i]));
} else {
printf("%c", toupper(str[i]));
}
} else if (isdigit(str[i])) {
printf("%c", str[i]);
} else {
continue;
}
}
return 0;
}