0
Why am i getting no output while i think it should come "four" Or where am i wrong help 🙏
int x=4; switch(x) {case 1: Console.WriteLine("one"); break; case 2: Console.WriteLine("two"); break; case 3: Console.WriteLine("four"); break; } // No output (but why?) Shouldnt it be four or????
1 ответ
+ 2
x is equal to 4
it goes throw the cases: 1, 2, 3
none of which equal 4 ...
so no there is no output
add a default case or more cases 🤷♂️