How do I make the value of integer underflow to zero instead of it wrapping around?

96 Views Asked by At

I want to make sure that the user inputs unsigned integers. Is it possible to implement a simple solution so that when the user inputs negative values, it will always return zero instead of it wrapping around like how integer underflows work?

0

There are 0 best solutions below