+ 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?

1st Aug 2016, 11:00 PM
Silver Night
Silver Night - avatar
3 Antworten
+ 4
no need of switch you can easily test it by using if statement Syntax :--- if((x==7)&&(y==4))
13th Jun 2017, 11:57 AM
Gaurav K
Gaurav K - avatar
+ 3
using switch you can do it as follows: case 7: case 4: cout<<"Doubt"; break;
17th Sep 2017, 10:08 AM
Sunil Raj
Sunil Raj - avatar
+ 1
if( X == 7 && Y == 4)
3rd Aug 2016, 1:54 PM
Null Void
Null Void - avatar