程序代码:
#include <stdio.h>
#pragma warning (disable:4996)
#include <windows.h>
int main()
{
int num;
while ((num = getchar()) != EOF)
{
if (num >= 'a' && num <= 'z')
{
printf(" %c\n",num-32);
}
else if (num >= 'A' && num <= 'Z')
{
printf(" %c\n", num + 32);
}
else
{
;
}
}
system("pause");
return 0;
}
程序运行结果: