How to use a "OR" condition in C++.
For example if we want to write " if nm = a or b or c " , then how we can write it ?
Answers
Answered by
2
if((nm==a)||(nm==b)||(nm==c))
using this can able to complete ur program...
using this can able to complete ur program...
harishvermabaq:
Sorry it's not working
Answered by
3
if( (nm=='a') || (nm=='b') || (nm=='c') )
this would work is a,b,c are characters. if they are variables then,
if( (nm==a) || (nm==b) || (nm==c) )
this would work is a,b,c are characters. if they are variables then,
if( (nm==a) || (nm==b) || (nm==c) )
Similar questions