wap to enter a character from user , check and print it is vowel or consonent .




#include<stdio.h>
#include<conio.h>
 main()
{
    int lower ,upper;
    char ch;
    
    printf("enter any character ");
    scanf(" %c",&ch);

    lower=(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u');

    upper=(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U');

    if ( lower||upper )
    printf("\nit is a vowel");

    else
    printf("\nit is consonent");

       
}

output 1 :
enter any character a it is a vowel


output 2 :
enter any character R

it is consonent


Comments

Popular Post

Define a class to represent a Bank Account. Include the following members: Data Members: i. Name of the depositor ii. Account number iii. Type of account iv. Balance amount in the account Member Functions: 1. To Input initial values 2. To deposit an amount 3. To withdraw an amount after checking the balance 4. To display name and balance Also write constructor for this class that takes four arguments. It should also handle type of account as savings by default