从键盘输入一个字符,判断它是否是英文字母。
#include <stdio.h>
void main()
{char c;
printf("input a character:");
c=getchar();
if(c>= &&c<= || c>=‘a’ &&c<= ‘z’) printf("Yes\n");
else printf("No");
}
A Z
'A'
'Z'
A;Z
'A''Z'
'A' 'Z'
"A"
"Z"
AZ
A,Z
1.’A’ 2.’Z’
int main()
if(c>= 'A' &&c<= 'Z' || c>='a' &&c<= 'z') printf("Yes\n");
‘A’ ‘Z’
char c; printf("enter a character"); c = getchar(); if (c >= 'A' && c <= "Z" || c >= 'a' && c <= 'z') { printf("是英文字母"); } else { printf("不是"); }
if(c>= 'A' &&c<= 'Z' || c>=‘a’ &&c<= ‘z’) printf("Yes\n");
‘A’
#include void main() {char c; printf("input a character:"); c=getchar(); if(c>= ‘A’ &&c<= ‘Z’ || c>=‘a’ &&c<= ‘z’) printf("Yes\n"); else printf("No"); }
'z'
A’ ‘Z’
'A‘ ‘Z’
薄冰百天,我要上西南交通大鞋
A' 'Z'
if(c>='A' &&c<= 'Z' || c>='a' &&c<= 'z') printf("Yes\n");
‘A’‘Z’
12
A
Z
65,101
if(c>= 'A' &&c<='Z' || c>=‘a’ &&c<= ‘z’) printf("Yes\n");
'A' ,'Z'
char chr; c = getchar(); if (c => 'A' && c <='Z' || c>='a' && c<='z' ){ //... }else //...
if(c>=’A‘&&c<=’Z‘|| c>=‘a’ &&c<= ‘z’) printf("Yes\n");
#include <stdi...
用户登录可进行刷题及查看答案
if(c>= ‘A’ &&c<= ‘Z’ || c>=‘a’ &&c<= ‘z’) printf("Yes\n");
登录后提交答案