+ 3

C# Errors

Can anyone help? I don't see what's wrong and I don't understand the errors. I think I've gotten too used to Python’s readability. Lol Code: https://code.sololearn.com/cnw4M7i8UYod/?ref=app

10th Mar 2018, 10:25 PM
RuthlessDust
RuthlessDust - avatar
2 Answers
+ 7
Variables can only be declared inside a class or method. Move number1, number2, and answer to main(). By the way, those 5 lines at the top of your code are importing other namespaces you can use. Ex: "using System;" allows you to use Console.WriteLine(); instead of System.Console.WriteLine(); using System; is all you really need, but you can leave them all.
10th Mar 2018, 10:46 PM
Tamra
Tamra - avatar
+ 1
@Tamra, @(JapaneseTextICan’tFindOnMyJapaneseKeyboard), Thanks!
10th Mar 2018, 10:53 PM
RuthlessDust
RuthlessDust - avatar