Answers for "letter in alphabet or not"

C
0

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;
}
Posted by: Guest on March-30-2022

Code answers related to "letter in alphabet or not"

Code answers related to "C"

Browse Popular Code Answers by Language