What is the cause of the errors in this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is the cause of the errors in this code?

Why are there so many errors in my code https://code.sololearn.com/cFTEDNml14H4/?ref=app

16th Sep 2020, 10:41 AM
Joseph Oritseweyinmi
Joseph Oritseweyinmi - avatar
4 Answers
+ 2
Because you are trying to call a non-static field from a static method. Make your fields static
16th Sep 2020, 11:18 AM
ะะปะตะบัะฐะฝะดั€ ะะปะตะบัะตะตะฒ
+ 2
your program have soo many errors i noticed one. Their is one mistake in line 40 where you comparing result You put Curly bracket wrongly. if (result == result2) } Console.WriteLine("amicable"); } First brac should be open brac you put closing one bracket is missing here public static void getamicable(int input) { }
16th Sep 2020, 11:23 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Thanks guys but i'm still getting errors
16th Sep 2020, 11:25 AM
Joseph Oritseweyinmi
Joseph Oritseweyinmi - avatar
+ 1
I don't know C#. So I can't fix the full errors. But I can something. You are mostly mistake on curly brackets. See comments of code. https://code.sololearn.com/cXOF28Y128OY/?ref=app
16th Sep 2020, 11:26 AM
Vadivelan