+ 1

I need help!

so i’m a beginner and i just wrote a little script with a math task, taking the input of the player and telling you if it’s right or wrong.. but i can’t seem to get it right :( could somebody help me? https://code.sololearn.com/cg3klL9qiK55/?ref=app

11th Nov 2019, 8:17 PM
Orfeo Kaplow
7 Antworten
+ 2
->Get.PlayerInput; ->PlayerInput = I; Get is not the correct way to get input in c# -> if() The if statement does not have condition to evaluate. https://csharp.net-tutorials.com/control-structures/if-statement/ Please choose a more descriptive title Please put the language you use in the tags
11th Nov 2019, 8:41 PM
sneeze
sneeze - avatar
+ 1
thankyou very much for your help! i had a look at the link and tried to apply that into my code aswell as the code “ConvertToInt32(Console.ReadLine()); i got the following error though: usercode/file.cs(24,6): error CS0029: Cannot implicitly convert type 'int' to 'bool'
11th Nov 2019, 9:08 PM
Orfeo Kaplow
+ 1
Hi, I have tried your code and I have made some changes in the code. There are some changes to the code. Following is the link to my code. You can refer to it. https://code.sololearn.com/cGZbFfUUrefT/#cs
12th Nov 2019, 3:43 AM
Ishan Shah
Ishan Shah - avatar
+ 1
Ishan Shah very nice! i’ve made similar changes already, but thanks!
12th Nov 2019, 7:05 AM
Orfeo Kaplow
- 1
Thankyou very much! I’ve been struggling to get this right but thanks to your help It finally works!
11th Nov 2019, 9:21 PM
Orfeo Kaplow