3-1 3.1判断大小写
3.1. Write a C program that accepts a charater using the scanf() function and determines if the character is a lowercase letter.A lowercase letter is any character that is greater than or equal to ‘a’ and less than or equal to ‘z’.If the entered character is a lowercase letter,display the message The character just entered is a lowercase letter.If the entered letter is not lowercase,display the message The character just entered is not a lowercase letter.(10分)
输入格式:
在一行中输入一个字母。
输出格式:
对每一组输入,在一行中输出该字母是否是小写字母。
输入样例:
在这里给出一组输入。例如:
a
输出样例:
在这里给出相应的输出。例如:
The character just entered is a lowercase letter
#include<stdio.h>
int main()
{
char letter;
scanf("%c",&letter);
if('a'<=letter&&letter<='z')
printf("The character just entered is a lowercase letter");
else
printf("The character just entered is not a lowercase letter");
return 0;
}