I'm trying to create a program that compares two numbers and checks if the first one is greater than the second. The first code snippet works fine, but my second one keeps crashing on various online compilers and even in VS Code, which isn't giving me the output I expect. Can anyone explain why this is happening?
3 Answers
Are you getting an error message when it crashes? If so, what does it say? That could really help pinpoint the issue!
I tried to create a program that compares the two numbers using booleans, but it keeps crashing. Any thoughts on what might be going wrong?
What kind of error are you encountering? From what I see, your code should run without any issues.

Which online compilers are you using, and are you getting any error messages? Also, when you say VS Code isn't producing the right output, what exactly are you seeing? Sometimes it helps to go back to the basics and just compile and run your code directly using gcc or clang.