C 语言实例 - 判断字母
C 语言教程
· 2019-02-20 17:56:38
用户输入一个字符,判断该字符是否为一个字母。
实例
#include <stdio.h>
int main()
{
char c;
printf("输入一个字符: ");
scanf("%c",&c);
if( (c>='a' && c<='z') || (c>='A' && c<='Z'))
printf("%c 是字母",c);
else
printf("%c 不是字母",c);
return 0;
}
运行结果:
输入一个字符: a a 是字母
点击查看所有 C 语言教程 文章: https://codercto.com/courses/l/17.html
Algorithm Design
Jon Kleinberg、Éva Tardos / Addison-Wesley / 2005-3-26 / USD 144.20
Algorithm Design introduces algorithms by looking at the real-world problems that motivate them. The book teaches students a range of design and analysis techniques for problems that arise in compu......一起来看看 《Algorithm Design》 这本书的介绍吧!