Program for checking Vowel and Consonants. In C++

in #programming6 years ago

  Program

A program is set of instruction given by user to computer to perform a specific task.computer program, in depth intend or else process in lieu of solving a riddle by means of a computer; supplementary specifically, an unambiguous, well thought-out string of computational advice indispensable near attain such a solution.  

Program Body:

#include<iostream>
#include<conio.h>
using namespace std;
int main(){
char alphabet;
cout<<"Enter any alphabet to know weather it is vowel or consonant"<<endl;
cin>>alphabet;
switch (alphabet)
case 'a':{
cout<<"vowel"<<endl;
break;
case 'e':
cout<<"vowel"<<endl;
break;
case 'i':
cout<<"vowel"<<endl;
break;
case 'o':
cout<<"vowel"<<endl;
break;
case 'u':
cout<<"vowel"<<endl;
case 'A':{
cout<<"vowel"<<endl;
break;
case 'E':
cout<<"vowel"<<endl;
break;
case 'I':
cout<<"vowel"<<endl;
break;
case 'O':
cout<<"vowel"<<endl;
break;
case 'U ':
cout<<"vowel"<<endl;
default:
    cout<<"its a consonant"<<endl;
break;
}
}
}

 

Written in C++

Source


Made in Visual C++ IDE

Source

 I hope it was helpful and you learned something from it, Thanks

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 61399.80
ETH 2987.20
USDT 1.00
SBD 3.42