if else else if in cpp in dsa

technical talkiess
0

  char ch;

    cout<<"Enter a Character: ";

    cin>>ch;

    if((ch>='A' && ch<='Z')){

      cout<<endl<<ch<<" Upper case is an Alphabet";

    }else if((ch>='a' && ch<='z') ){

      cout<<endl<<ch<<" Lower case is an Alphabet";

    }else if((ch>='0' || ch<='9')){

      cout<<endl<<ch<<"Its a number";

       cout<<endl;

    }

     return 0;

Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)