25. Program to Check Whether a Character is an Alphabet or not


Comments

  1. //Character is Alphabet or Not
    #include
    #include
    void main()
    {
    char c;
    clrscr();
    printf("\nEnter character:\n");
    scanf("\n%c",&c);
    if((c>='a'&& c<='z')||(c>='A'&& c<='Z'))
    printf("\n\t %c is a Alphabet ",c);
    else
    printf("\n\t %c is not a Alphabet ",c);
    getch();
    }

    ReplyDelete
  2. Anonymous2:00 PM

    #include
    #include
    void main()
    {
    char c;
    printf("enter the character");
    scanf("%c",&c);
    if(c>='a'&&c<='z')
    {
    printf(" %c is alphabet",c);
    }
    else
    {
    printf("%c is not alphabet",c);

    return(0);
    }
    }

    ReplyDelete

Post a Comment