+ 1
What if i wanted to test 2 variables in the same statement?
Like if x=7 and Y = 4 . Can you use a switch?
3 ответов
+ 4
no need of switch you can easily test it by using if statement
Syntax :---
if((x==7)&&(y==4))
+ 3
using switch you can do it as follows:
case 7:
case 4:
cout<<"Doubt";
break;
+ 1
if( X == 7 && Y == 4)