how to define a remainder using programming?