大小写字母转换

#include
main()
{
int c;
printf("请输入一个小写字母:");
c=getchar()-32;
putchar(c);
putchar('\n');
}

查询ASCII码

#include
main()
{
int c;
printf("请输入一个字符");
c=getchar();
printf("%c的ASCII码值为 %d\n",c,c);
}

Powered by FC2 Blog

FC2Ad

FC2ブログ
Copyright © 飞凡 All Rights Reserved.