0
Using two switch statements but getting only one output !! why?
4 ответов
+ 1
Could you provide the code so we can help you out?
0
May be because you haven't defined the default case in any or one of your switch statement. So only one switch statement have a case match, and second haven't.
for maximum help , post your code snippet where you are having problem.
(first upload it to the playground section, them share it's link here)
0
In some languages like C++ you also need a break; statement (or similar) in every case. Otherwise the next case will also be executed which might overwrite your result if this was not intended.
0
thanks guys my problem has been solved
i was using break statement thats why i was getting only one output .