You can check the latex code using online latex interpreters that require no download. Just google. Microsoft word also has support for laTeX. If the code looks as expected, it means that your code is fine, but something to do with the way you are compiling the code in MikTeX.
Good luck,
Sai.