Every time I launch Visual Studio and run my project, I encounter inconsistent results. Sometimes it works perfectly fine while other times it gives unexpected outcomes without any changes in my code. I have provided screenshots to illustrate the issue, please take a look at both images and assist me with a solution.