当前位置:网站首页>Upper and lower case letter conversion
Upper and lower case letter conversion
2022-07-23 12:33:00 【xiq1212】
The code is as follows :
#include <stdio.h>
int main(int argc,const char *argv[])
{
char a,b;
printf(" Please enter :");
scanf("%c",&a);
if(a>='A'&&a<='Z')
b=a+32;
else if(a>='a'&&a<='z')
b=a-32;
else
{
printf(" The input is not a letter \n");
return -1;
}
printf(" Convert to :%c\n",b);
return 0;
}
Running results :
[email protected]:~/test/c-day3$ ./a.out
Please enter :A
Convert to :a
[email protected]:~/test/c-day3$ ./a.out
Please enter :g
Convert to :G
[email protected]:~/test/c-day3$ ./a.out
Please enter :4
The input is not a letter
边栏推荐
- 硬件知识2--协议类(基于百问网硬件操作大全视频教程)
- Interpretation of the paper: "i4mc deep: intelligent prediction of N4 methylcytosine sites using deep learning methods with chemical properties"
- 编码器的一点理解
- Use pyod to detect outliers
- What technologies are used in pharmaceutical research and development in the field of life sciences? Cryoelectron microscope? Molecular simulation? IND?
- 输入三角形边长,求面积
- [CAN总线的物理层 ]1.CAN/CANFD采样的点的内容分享
- ARM架构与编程4--串口(基于百问网ARM架构与编程教程视频)
- The green data center "counting from the east to the west" was fully launched
- 单片机学习笔记7--SysTick定时器(基于百问网STM32F103系列教程)
猜你喜欢

How to build a liquid cooling data center is supported by blue ocean brain liquid cooling technology

时间序列的数据分析(一):主要成分

硬件知识1--原理图和接口类型(基于百问网硬件操作大全视频教程)

Using pycaret: low code, automated machine learning framework to solve regression problems

时间序列的数据分析(三):经典时间序列分解

【AUTOSAR CanDrive 2.了解通信Hoh、CanId与PduID的Mapping关系】

利用pycaret:低代码,自动化机器学习框架解决回归问题

【AUTOSAR COM 1.通信协议栈介绍】

Introduction and practice of Google or tools for linear programming

利用or-tools来求解带容量限制的路径规划问题(CVRP)
随机推荐
Using pycaret: low code, automated machine learning framework to solve regression problems
Data analysis of time series (I): main components
博客搭建二:NexT主题相关设置beta
[introduction to AUTOSAR com 4.com service layer module]
CPC client installation tutorial
Matplotlib Usage Summary
对字符串函数的使用和理解(1)
利用or-tools来求解路径规划问题(VRP)
钢结构基本原理全面详细总结
高分子物理名词解释归纳
单片机学习笔记5--STM32时钟系统(基于百问网STM32F103系列教程)
How to establish data analysis thinking
Deep convolution generation countermeasure network
Interpretation of the paper: DNA enhancer sequence recognition transformer structure based on Bert and two-dimensional convolutional neural network
【AUTOSAR CanTP 1.学习UDS诊断的网络层协议】
Interpretation of the paper: recognition of enhancer promoter interactions with neural networks based on pre trained DNA vectors and attention mechanisms
switch实现表达式计算
利用pycaret:低代码,自动化机器学习框架解决分类问题
博客搭建一:框架选择
google or-tools的复杂排班程序深度解读