# MOD and DIV Functions?

Watch
Announcements
#1
What does MOD do and could you give me an example?

What does DIV do and could you give me an example?

Thank you 0
11 years ago
#2
(Original post by Jonario)
What does MOD do and could you give me an example?

What does DIV do and could you give me an example?

Thank you a MOD as in a phpBB MOD?

DIV as in what language? Html, c# or what?
0
11 years ago
#3
Mentioning the language would be a start, but typically...

MOD - 'modulus', the remainder after an integer division. 10 MOD 3 = 1, 11 MOD 3 = 2, 12 MOD 3 = 0 etc. Different implementations of different languages have different ideas about what should happen if you're involving negative numbers (some reckon the remainder should always be positive, some allow it to be negative).

DIV - integer DIVision. 10 DIV 3 = 3, 11 DIV 3 = 3, 12 DIV 3 = 4 etc. Again, it gets interesting when you involve negative numbers, but (A DIV B) * B + (A MOD B) = A
2
11 years ago
#4
(Original post by unprinted)
Mentioning the language would be a start, but typically...

MOD - 'modulus', the remainder after an integer division. 10 MOD 3 = 1, 11 MOD 3 = 2, 12 MOD 3 = 0 etc. Different implementations of different languages have different ideas about what should happen if you're involving negative numbers (some reckon the remainder should always be positive, some allow it to be negative).

DIV - integer DIVision. 10 DIV 3 = 3, 11 DIV 3 = 3, 12 DIV 3 = 4 etc. Again, it gets interesting when you involve negative numbers, but (A DIV B) * B + (A MOD B) = A
Lol. I never even thought of a Modulo operation. 0
#5
(Original post by tomfb)
a MOD as in a phpBB MOD?

DIV as in what language? Html, c# or what?
Visual basic sorry
0
#6
(Original post by unprinted)
Mentioning the language would be a start, but typically...

MOD - 'modulus', the remainder after an integer division. 10 MOD 3 = 1, 11 MOD 3 = 2, 12 MOD 3 = 0 etc. Different implementations of different languages have different ideas about what should happen if you're involving negative numbers (some reckon the remainder should always be positive, some allow it to be negative).

DIV - integer DIVision. 10 DIV 3 = 3, 11 DIV 3 = 3, 12 DIV 3 = 4 etc. Again, it gets interesting when you involve negative numbers, but (A DIV B) * B + (A MOD B) = A
Thank you very much =)
0
11 years ago
#7
(Original post by Jonario)
Visual basic sorry
Ah ok, I was completely on the wrong tracks. Check the post by unprinted.
0
7 years ago
#8
(Original post by unprinted)
Mentioning the language would be a start, but typically...

MOD - 'modulus', the remainder after an integer division. 10 MOD 3 = 1, 11 MOD 3 = 2, 12 MOD 3 = 0 etc. Different implementations of different languages have different ideas about what should happen if you're involving negative numbers (some reckon the remainder should always be positive, some allow it to be negative).

DIV - integer DIVision. 10 DIV 3 = 3, 11 DIV 3 = 3, 12 DIV 3 = 4 etc. Again, it gets interesting when you involve negative numbers, but (A DIV B) * B + (A MOD B) = A
When writing the answer to DIV if it contains more than one Integer do you include all the Integers before the decimal or just the first Integer in the answer? Does this also apply to MOD as well but the other way around?
0
7 years ago
#9
Integer is the proper word for what primary school called a 'positive or negative whole number'. It can have many digits.

The answer to DIV is a single integer:

1 DIV 3 = 0
10 DIV 3 = 3
100 DIV 3 = 33
1000 DIV 3 = 333

So is the answer to MOD:

2 MOD 7 = 2
20 MOD 7 = 6
etc
0
3 years ago
#10
what is mod
0
3 years ago
#11
shut up and choke me daddy
0
3 years ago
#12
do you know tye casie wint. choke me daddy
0
2 years ago
#13
Cheers mush it helped  0
1 year ago
#14
12 div 10
0
1 year ago
#15
In basic termilonolgy:
MOD -> remainder
DIV -> quotient

so let's say 10/3
10 MOD 3 = 1 (3*3 = 9 so remainder 1)
10 DIV 3 = 3 (3 goes into 10, 3 times)
0
X

new posts Back
to top
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### Poll

Join the discussion

Yes, and I've sent off my application! (152)
54.87%
I've made my choices but havent sent my application yet (39)
14.08%
I've got a good idea about the choices I want to make (31)
11.19%
I'm researching but still not sure which universities I want to apply to (26)
9.39%
I haven't started researching yet (16)
5.78%
Something else (let us know in the thread!) (13)
4.69%