0

Ayuda.. los casos de prueba están bien y no aprueba

class Program { static void Main(string[] args) { int num = Convert.ToInt32(Console.ReadLine()); /* 1 - Sports 2 - Politics 3 - Business 4 - Technology 5 - Art */ //tu código va aquí switch (num) { case 1: Console.WriteLine("Sports"); break; case 2: Console.WriteLine("Politics"); break; case 3: Console.WriteLine("Business"); break; case 4: Console.WriteLine("Art"); break; } } } }

24th Jun 2021, 10:11 PM
anibal heredia
anibal heredia - avatar
9 Réponses
0
Anibal ? bracket Error Brother. check brackets ?
24th Jun 2021, 10:59 PM
JRAMAHES
JRAMAHES - avatar
0
Not error. Casé 1 2 3 ok.. i dont know..
24th Jun 2021, 11:01 PM
anibal heredia
anibal heredia - avatar
0
would you put the entire code here and the problem as well please ?>
24th Jun 2021, 11:08 PM
JRAMAHES
JRAMAHES - avatar
0
oh I see it : you re missing the Technology statement on switch, just add it
24th Jun 2021, 11:10 PM
JRAMAHES
JRAMAHES - avatar
0
Read example please
24th Jun 2021, 11:16 PM
anibal heredia
anibal heredia - avatar
0
Ah ok
24th Jun 2021, 11:16 PM
anibal heredia
anibal heredia - avatar
0
write like this switch(num){ case 1: Console.WriteLine("Sports"); break; case 2: Console.WriteLine("Politics"); break; case 3: Console.WriteLine("Business"); break; case 4: Console.WriteLine("Technology"); break; case 5: Console.WriteLine("Art"); break;
24th Jun 2021, 11:18 PM
JRAMAHES
JRAMAHES - avatar
0
Ah okey.. say this menu: 1 sport 2: Polítics.3: business 4:Technology 5: Art
24th Jun 2021, 11:20 PM
anibal heredia
anibal heredia - avatar
0
Ok finsh.. Thanks... :)
24th Jun 2021, 11:22 PM
anibal heredia
anibal heredia - avatar