0

How to make this code run?

I am still getting some problem with the switch statement hence I want find out a solution to make the following programme run. https://code.sololearn.com/ctJGIng28191/?ref=app

16th May 2017, 10:00 AM
Jordy Kenneth
Jordy Kenneth - avatar
3 Respostas
0
switch is used for checking given value and not calculate value, in your case you should use the " if else" statement int age = 24; if (age>18){ Console.WriteLine("Here you are"); } else if(age<18){ Console.WriteLine("No smoking underage"); }
16th May 2017, 10:51 AM
Loai Hazima
Loai Hazima - avatar