0

Can you tell me what is wrong here?(Solved)(TNX)

Its a sololearn c# practice test, all conditions ive done, but when i tap "Run" to pass the test, my result as same as practise result , and it says that its not ok. https://code.sololearn.com/cvaBt71r8TKT/?ref=app Here's the conds: You are creating a video game. To complete the level, the player needs to score at least 80 points. If a player scores 90 or more points, he receives a special gift. Write a program that takes points as input and outputs "Level completed" if the player has enough scores. In addition, if the player scored more than 90 points, the program should also display "Extra gift" in the result. Sample input 92 Result example Level completed Extra gift Here the new version of the code, and it's working correct , but the task still says that's incorrect https://code.sololearn.com/cERRew1L3Kmo/?ref=app

27th Feb 2021, 1:02 PM
Nazik Sidorchuk
Nazik Sidorchuk - avatar
5 Answers
+ 1
Nazik Sidorchuk Hello, we can't figure out what exactly is wrong without complete details. Try to paste the challenge details here so we may help. Thanks. Just a possibility, but I think you need an another else on your outer 'if' statement. if (points >= 80) { if (points >= 90) // Level completed else // You Lose } else // You Lose
27th Feb 2021, 1:07 PM
noteve
noteve - avatar
+ 1
Nazik Sidorchuk No it's not a bug. There is problem in your code. According to problem 1 - if points is greater than or equal to 80 then Level completed else You lost 2 - if points is greater than or equal to 90 then Extra gift. So if (points >= 80) { Console.WriteLine("Level completed"); if (points >= 90) { Console.WriteLine("Extra gift"); } } else { Console.WriteLine("You lost"); }
27th Feb 2021, 3:00 PM
A͢J
A͢J - avatar
+ 1
are you sure output are the same as expected (ie: no additional spaces, no uppercase/lowercase mess? quickly looking at your first code, I found this string to be outputed for example: "Level completed , Extra gift" are you sure you need the space between 'completed' and following punctuation mark?
27th Feb 2021, 3:54 PM
visph
visph - avatar
+ 1
GUYS IM SORRY, THE SOLOLEARN TASK WANTED ME TO OUTPUT "YOU LOST" ,IVE TUPED "YOU LOSE" SO THE TASK DIDNT WANTED TO COUNT OMG*FACEPALM*
27th Feb 2021, 7:12 PM
Nazik Sidorchuk
Nazik Sidorchuk - avatar
0
I think its a SoloLearn practise test bug
27th Feb 2021, 1:21 PM
Nazik Sidorchuk
Nazik Sidorchuk - avatar