Why does my second code keep crashing while the first one works?

0
15
Asked By TechWhiz92 On

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

Answered By CoderGuy87 On

Are you getting an error message when it crashes? If so, what does it say? That could really help pinpoint the issue!

Answered By LogicSeeker44 On

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?

SyntaxSavvy -

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.

Answered By DebuggingNoob On

What kind of error are you encountering? From what I see, your code should run without any issues.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.