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;
}
相关推荐
学习中.........39 分钟前
Transformer 训练资源估算:以 CS336 GPT-2 XL 配置为例
人工智能·python·算法·机器学习·自然语言处理
kkkkkkkkkk_Z6 小时前
学嵌入式和C语言编程数据结构|学习日记Day22:栈,二叉树,哈希存储
c语言·数据结构·学习
Navigator_Z6 小时前
LeetCode //C - 1206. Design Skiplist
c语言·算法·leetcode
码行山野赴时序归途6 小时前
三道经典数组题:从暴力到最优的算法思维
c语言·开发语言·数据结构·算法·leetcode
徐小夕6 小时前
3分钟从想法到Agent上线:我们开源了一款AI可视化工作流“IDE”
前端·算法·github
sel_97 小时前
【强化学习】Hands-on Modern RL项目实践|OPD 算法完整解析
人工智能·深度学习·算法·机器学习·语言模型
Navigator_Z8 小时前
LeetCode //C - 1209. Remove All Adjacent Duplicates in String II
c语言·算法·leetcode
ShineWinsu10 小时前
对于 C++:C++14中从变量模板、泛型 Lambda 到并发与字面量的解析
c++·算法
土司大王11 小时前
LeetCode hot100——合并两个有序链表
算法·leetcode·链表