Is it a VOWEL or CONSONANT||codechef||beginner solution ||programming info

Is it a VOWEL or CONSONANT

Write a program to take a character (C) as input and check whether the given character is a vowel or a consonant.

NOTE: Vowels are 'A', 'E', 'I', 'O', 'U'. Rest all alphabets are called consonants.

Input:

  • First line will contain the character C.

Output:

Print "Vowel" if the given character is a vowel, otherwise print "Consonant".

Constraints

  • C will be an upper case English alphabet

Sample Input:

Z

Sample Output:

Consonant
SOLUTION USING C LANGUAGE:-
#include <stdio.h> int main(void) { char c; scanf("%c\n",&c); if(c=='A'||c=='E'||c=='I'||c=='O'||c=='U') printf("Vowel"); else printf("Consonant"); // your code goes here return 0; }
Share:

No comments:

Post a Comment

Translate

Recommended platforms

  1. codechef
  2. hackerrank
  3. codeforces
  4. leetcode
  5. hackerearth

Popular Posts

programming_info. Powered by Blogger.

Blog Archive

Recent Posts

other platforms

  • geeks for geeks
  • w3schools
  • codepen
  • skillshare
  • udemy

Pages

reader support Support