This is C# program I stuck because output shows no error but logical error and this not let me choose number according to guess | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

This is C# program I stuck because output shows no error but logical error and this not let me choose number according to guess

First a random song name with the artist is chosen from the list of 20 songs and artist Outputs the song and artist after The first letter of each word of the song is displayed Q:The first letter of the song writers name is displayed "Have one variable that counts the number of times the user has tried to guess the singer .Have a variable that displays the total amount of points they have If they guess the song name and the song writer on the first try right, they get 3 points Add 3 to the total Otherwise, If they don't get it right then they should get anothertry then add 1 to the counter And if they guess it fight this time then they only get 1 point Add 1 to total When the counter variable is 2 then the program should stop Then output that they have lost the game Then the program will repeat Here is code https://code.sololearn.com/cXYmPi3Xi7j5/?ref=app Problem is that when I guess number it's still showing incorrect try again Output not same according to discription Find logical error and slove it

4th Jan 2022, 7:43 PM
Muhammad Uzair
Muhammad Uzair - avatar
8 Answers
+ 2
You can increase the chances of getting help if you format your code so it is more readable
4th Jan 2022, 8:00 PM
Lisa
Lisa - avatar
+ 2
Please read my previous comment about code format and readability again. A general remark: When you compare strings, you probably need the .Equals() method instead of ==
4th Jan 2022, 8:09 PM
Lisa
Lisa - avatar
+ 1
Did you understand my replies?
4th Jan 2022, 8:30 PM
Lisa
Lisa - avatar
4th Jan 2022, 8:01 PM
Muhammad Uzair
Muhammad Uzair - avatar
0
Here is code attached
4th Jan 2022, 8:01 PM
Muhammad Uzair
Muhammad Uzair - avatar
0
No
4th Jan 2022, 8:31 PM
Muhammad Uzair
Muhammad Uzair - avatar
- 1
Oky fix it and send me code thkx for it
4th Jan 2022, 8:20 PM
Muhammad Uzair
Muhammad Uzair - avatar
- 1
I want u to fix it just 🥺🥺
4th Jan 2022, 8:31 PM
Muhammad Uzair
Muhammad Uzair - avatar