Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

letter in alphabet or not

#include <stdio.h>
int main() {
    char c;
    printf("Enter a character: ");
    scanf("%c", &c);

    if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
        printf("%c is an alphabet.", c);
    else
        printf("%c is not an alphabet.", c);

    return 0;
}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #letter #alphabet
ADD COMMENT
Topic
Name
1+2 =