c 语言将大写字符转换成为小写字符

直接上代码

Method1:

复制代码
#include<stdio.h>
int main() {
	char input,output;
	scanf("%c",&input);
	output = input + 32;
	printf("%c\n",output);
	return 0;
}

Method2:

复制代码
#include<stdio.h>
int main() {
	char input,output;
	scanf("%c",&input);
	output = input + ('a' -'A');
	printf("%c\n",output);
	return 0;
}
相关推荐
Dillon Dong3 分钟前
按位或(|=)的核心魔力:用宏定义优雅管理嵌入式故障字
c语言·stm32
leiming64 分钟前
c++ string 容器
开发语言·c++·算法
wljun7391 小时前
六、OrcaSlicer 切片之区域
算法·切片软件 orcaslicer
superman超哥1 小时前
仓颉Option类型的空安全处理深度解析
c语言·开发语言·c++·python·仓颉
2401_841495641 小时前
【LeetCode刷题】跳跃游戏Ⅱ
数据结构·python·算法·leetcode·数组·贪心策略·跳跃游戏
leaves falling1 小时前
动态规划讲解
算法·动态规划
钓鱼的肝1 小时前
GESP系列(3级)小杨的储蓄
开发语言·数据结构·c++·笔记·算法·gesp
MicroTech20251 小时前
MLGO微算法科技推出人工智能与量子计算融合新成果:基于QLSS与LCHS的量子DPM算法技术
人工智能·科技·算法
AndrewHZ1 小时前
【图像处理基石】[特殊字符]圣诞特辑:10+经典图像处理算法,让你的图片充满节日氛围感!
图像处理·人工智能·opencv·算法·计算机视觉·stable diffusion·节日氛围感
艾醒2 小时前
大模型原理剖析——矩阵吸收优化:LLM推理加速的核心原理与实践
算法