Pages

Saturday, 19 May 2012

program to input character and find out capital and small consonants or vowel


24./*Write a program to input character and find out capital and small  consonants or vowel*/

#include<stdio.h>
#include<conio.h>
main()
{
            char ch;
            clrscr();
            printf("Enter a character");
            scanf("%c",&ch);
            if(ch>='A' && ch<='Z')
            if(ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U')
            printf("capital Vowel");
            else
            printf("Capital consonants");
            else
            if(ch>='a' && ch<='z')
            if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u')
            printf("small vowel");
            else
            printf("small consonants");
            getch();
}
OUTPUT
            Enter a character: a  small vowel

No comments:

Post a Comment