C++ Program:

- To print whether an alphabet is Vowel or Consonant

Example:

User Input: z

Output: It's a consonant

#include <iostream>
using namespace std;

int main() {
  char c;
  cout<<"Enter your character : ";
  cin>>c;
  if(c=='a'||c=='A'||c=='e'||c=='E'||c=='i'||c=='I'||c=='o'||c=='O'||c=='u'||c=='U')
    cout<<"It's a vowel";
  else 
    cout<<"It's a consonant";
  return 0;
}

Output:

  Enter your character : E
  It's a vowel
Program
basic

You should know first :

Vowel alphabets: a, e, i, o, u

Consonant alphabets: Alphabets other than vowels

//Check for vowels both in uppercase & lowercase
  if(c=='a'||c=='A'||c=='e'||c=='E'||c=='i'||c=='I'||c=='o'||c=='O'||c=='u'||c=='U') {
    //if true print vowel
  }
  else {
    //if false print consonant
  } 
  
Concept

Coming Soon !

Quick
Tutorial

Quote

A good decision is based on knowledge and not on numbers.