Search Results

Search found 1 results on 1 pages for 'jellly'.

Page 1/1 | 1 

  • can we write this in C++ switch ?

    - by jellly
    #include <iostream> using namespace std; int main(){ char i; cin >>i; switch (i){ case ('e'||'i'||'o'||'u'||'a'): cout<<"Vowel"; break; case ('+'||'-'||'/'||'*'||'%'): cout<<"Op"; break; } return 0; } if not than how can we use comparison or logical operators in switch ? & why cant we declare and initialize variable in single case without using scope ?

    Read the article

1