Thursday, 11 May 2017

C++ tutorials in Hindi/Urdu - Switch Statement [24]





#include<constream.h>

#include<iomanip.h>

void main(){

clrscr();

    // switch

    char ch;

    cout<<"enter a letter";

    cin>>ch;

   

    switch(ch)

    {

case 'a':

case 'e':

case 'i':

        case 'o':

        case 'u':

            cout<<"Vowel";

               break;



        default:

            cout<<"Not vowel";

    }

 

getch();

}

No comments:

Post a Comment