Ajs135
asked on
c# Condtion to only accept Multiples of 20's....
i want to put a condition that the user can only withdrawal multiples of 20's. how would i do this?
i tried something like if( input != input %20) but that only letting accept 2 . . so it only letting type the remainder 20. if i put it == , it just ignores all completely, b/c i put 35 and it goes thru still.
i tried something like if( input != input %20) but that only letting accept 2 . . so it only letting type the remainder 20. if i put it == , it just ignores all completely, b/c i put 35 and it goes thru still.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if(input %20 == 0) will work fine
Thanks,