In: Computer Science
You have a function taking in two integer variables, x and y. You want to subtract x from y, but you want to make sure the result does not overflow. Write some lines of code (assuming x and y are already defined integers with values in them) to check if the result would be an overflow if x was subtracted from y. Do this without allowing an overflow to happen.
Here is my solution in image. please go through page by page.
If you Like it then give me a LIKE.
Solution: