It is suggested that you read Modulus Operator - Part 1 first.
You may not be aware of it, but you already know how to use the modulus operator. If you have ever made change (as cashiers do all the time), you are using the modulus operator. As an example, let's assume that you need to give a customer $0.93 in change. This would be your thinking, step by step:
Showing posts with label modulus mod rem. Show all posts
Showing posts with label modulus mod rem. Show all posts
Sunday, October 16, 2011
RAPTOR SKILL - Modulus Operator - Part 1
Every programming language has a modulus operator. Curiously RAPTOR has two, mod and rem. They can be used interchangeably. But what does modulus do and why do we need it? It's used to find the remainder after a division. For example,
Subscribe to:
Posts (Atom)