Vowel consonent

// this symbol || is or symbol


 #include <stdio.h>

#include <stdlib.h>


#define SIZE 30


int main (){

char ch;

char uppercase , lowercase;


printf("Enter an alphabate: ");

scanf("%c", &ch);

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

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

if (uppercase || lowercase){

printf("%c is a vowel", ch );

}else{

printf("%c is a consonent" , ch);

}

return 0 ;

}

Comments

Popular posts from this blog

Factors : using C

Cross shaped pattern

Factorial ! calculation