+ 1

math operator Switch

Hi! whith Which Of variables I Can switch Between Math Operators Such As +,-,×,÷

29th Dec 2016, 7:27 PM
Ali Afshar
Ali Afshar - avatar
9 odpowiedzi
+ 2
char data type
29th Dec 2016, 8:20 PM
Sandeep Chatterjee
+ 2
switch(...){ case x: .... break; case x: ... break; case x:
29th Dec 2016, 8:24 PM
Sandeep Chatterjee
+ 1
When Using Char All of Cases Will Be Selected!!! sry I Cant Speak English Well
29th Dec 2016, 8:21 PM
Ali Afshar
Ali Afshar - avatar
+ 1
no use break; it's not only with char
29th Dec 2016, 8:22 PM
Sandeep Chatterjee
+ 1
yes and you can post it in sololearn code playground too there program runs directly .
29th Dec 2016, 8:26 PM
Sandeep Chatterjee
+ 1
I Saved It In My Codes . Named Problem
29th Dec 2016, 8:33 PM
Ali Afshar
Ali Afshar - avatar
+ 1
I understand the problem. it is switch(opearator){ case '+': num2=num1+num2; break; case '-': num2=num1-num2; break; case '*': num2=num1*num2; break;
29th Dec 2016, 8:39 PM
Sandeep Chatterjee
0
Can I Send You My Code In A Social Network ? And You Tell Me Where Is Problem?
29th Dec 2016, 8:25 PM
Ali Afshar
Ali Afshar - avatar
0
Yes! Its Correct!!! Tnx Alot About Your Guidance
29th Dec 2016, 8:43 PM
Ali Afshar
Ali Afshar - avatar