64 604
Assignments Done
99,1%
Successfully Done
In September 2018

Answer to Question #47570 in C++ for krad

Question #47570
Write a program that determines if the input letter is a VOWEL or CONSONANT. The vowels are: A E I O U. Your program must be able to handle a capital or small input letter. In Switch Case
Expert's answer
#include <stdlib.h>
#include <iostream>  
#include <stdio.h>
#include <cstdlib>  
using namespace std;
int main()
{
char letter;

cout<<"Enter the letter"<<endl;
cin>>letter;

switch (letter)
            {
                case 'A':
                case 'a':
                case 'E':
                case 'e':
                case 'I':
                case 'i':
                case 'O':
                case 'o':
                case 'U':
                case 'u':              
                    cout<<letter<<" is a vowel"<<endl;
                    break;
                default:
                    cout<<letter<<" is a consonant"<<endl;
                    break;
            }
system("pause");
return 0;
}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions