The task is called "who wins". Please help find the bug. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

The task is called "who wins". Please help find the bug.

This is my code static void Main(string[] args) { string[] finalists = { "James Van", "John Smith", "Leyla Brown", "Tom Homerton", "Bob Douglas" }; int winner = Convert.ToInt32(Console.ReadLine()); //выведите победителя и фразы "Game Over" FinalRound finalRound = new FinalRound(finalists, winner); } } class FinalRound { public FinalRound(string[] finalists, int winner) { //завершите конструктор Console.WriteLine("Winner is " + finalists[winner]); } ~FinalRound(){ Console.WriteLine("Game over"); } //создайте деструктор => "Game Over" }

4th Sep 2021, 8:36 PM
Даниил Ермачков
Даниил Ермачков - avatar
12 Answers
+ 3
I am just guessing like the others: It looks like you are supposed to output "Game Over", but you output "Game over" with small 'o'. Maybe that's the reason? #GetInDreamCodingShape
5th Sep 2021, 7:23 AM
Agnes Ahlberg
Agnes Ahlberg - avatar
+ 2
You're welcome 🙂
5th Sep 2021, 10:09 AM
Agnes Ahlberg
Agnes Ahlberg - avatar
+ 1
Doesn't seem to have any problems when I run it, what is it that you expect it to behave?
4th Sep 2021, 8:49 PM
Tim
Tim - avatar
+ 1
Did you check if there's extra or missing { }?
4th Sep 2021, 8:56 PM
Tim
Tim - avatar
+ 1
If you can share the question it will be easy to find what exactly it asks for . Otherwise you can wait for a pro person to answer you.
4th Sep 2021, 9:06 PM
Abhay
Abhay - avatar
+ 1
Thank you so much
5th Sep 2021, 9:56 AM
Даниил Ермачков
Даниил Ермачков - avatar
+ 1
Thus, we check the Result as we check the ways to create a function cout << "hello world! "; Allowed ;
6th Sep 2021, 3:36 AM
Shubham Bhatia
Shubham Bhatia - avatar
0
You can just ask for help from code coach helpers .
4th Sep 2021, 8:50 PM
Khentit Nadji Sabri
0
Nick, As a result, everything is correctly deduced, but writes that there is a mistake
4th Sep 2021, 8:54 PM
Даниил Ермачков
Даниил Ермачков - avatar
0
yeah, I checked it out
4th Sep 2021, 9:00 PM
Даниил Ермачков
Даниил Ермачков - avatar
0
Founded error, or it should be like that... You don't set the FinalRound to void.
4th Sep 2021, 9:38 PM
GDSHNIK
GDSHNIK - avatar
0
GDSHNIK I don't see void anywhere near FinalRound
5th Sep 2021, 5:36 AM
Tim
Tim - avatar