Can someone please check my code?

He says right in his Original comment that he's using Visual Studio 2017. Doesn't it make sense for him to write this as a console app and learn what he needs to before progressing to an Arduino, or does he have to come in here after he learns to program? This forum is called "Programming Questions".

VS has an excellent debugger. I would recommend using that before downloading to an arduino. And the Arduino does has a plug in for VS. So he's not at all out of line here.