1.编写一个程序,给定一个大写字母,要求用小写输出
思路:ascII码值
例如:A的ASCII码值为65,a的ASCII码值为97,不难发现,大小写字母之间的ascii值相差了32
#include <stdio.h>
int main()
{char c;scanf("%c",&c);printf("%c",c+32);return 0;
}
思路:ascII码值
例如:A的ASCII码值为65,a的ASCII码值为97,不难发现,大小写字母之间的ascii值相差了32
#include <stdio.h>
int main()
{char c;scanf("%c",&c);printf("%c",c+32);return 0;
}