0

Switch statement wont exicute, what am I doing wrong?

int num = Convert.ToInt32(Console.ReadLine()); /* 1 - Sports 2 - Politics 3 - Business 4 - Technology 5 - Art */ //your code goes here case 1: ConsolemWriteLine("Sports"); break; case 2: Console.WriteLine("Politics"); break; case 3: Console.WriteLine("Buisness"); break; case 4: Console.Writealine("Technology"); break; case 5: Console.WriteLine("Art"); break;

3rd Jan 2021, 1:20 PM
Swiff _Vastolorde
Swiff _Vastolorde - avatar
3 Réponses
+ 1
Swiff _Vastolorde , you are missing the switch clause. Also there are many errors in WriteLine methods - missing ".", method Writeline(l should be uppercase), letter- "a" and "m" between Console class and WriteLine method. Look at the code. Hope it helps you. https://code.sololearn.com/cUuBOAuy71Xl/?ref=app
3rd Jan 2021, 1:53 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Thanks TheWh¡teCat 🇧🇬 . It def helped bro
3rd Jan 2021, 1:54 PM
Swiff _Vastolorde
Swiff _Vastolorde - avatar
0
You are welcome, Swiff _Vastolorde
3rd Jan 2021, 1:55 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar