7 Replies
if (num1 < 0 num2 < 0 num3 < 0 || num4 < 0);
in this line i want to specify that if any of these variables are negatives then the code will stop working
but it doesnt work
what do you mean doesn't work?
doesn't evaluate it as true?
when i enter only positive numbers in still stops the code
you have a
;
at the end of your if statement
if (num1 < 0 || num2 < 0 || num3 < 0 || num4 < 0);
should be:
if (num1 < 0 || num2 < 0 || num3 < 0 || num4 < 0)
thank you 🙏
$close
Use the /close command to mark a forum thread as answered