Hi
What exactly do you need help to?
Mod
var
a,b : integer;
begin
a:=123;
b:=a mod 50;
(** gives you B = 23 = the
rest when 123 are divided by 50
50 * 2 = 100 + rest(23) = 123*)
b:=a div 50;
(**gives you b=2 = what whole
number you could divide 123 by(the dividend).
50 = 123 : 50 = 2,.... everything
behind the comma are taken away
then we can say that
(a mod 50) + (a div 50)*50 = 123 **)
Regards
Batalf
Main Topics
Browse All Topics





by: BatalfPosted on 2000-01-14 at 05:38:59ID: 2352781
Hi
What exactly do you need help to?
Mod
var
a,b : integer;
begin
a:=123;
b:=a mod 50;
(** gives you B = 23 = the
rest when 123 are divided by 50
50 * 2 = 100 + rest(23) = 123*)
b:=a div 50;
(**gives you b=2 = what whole
number you could divide 123 by(the dividend).
50 = 123 : 50 = 2,.... everything
behind the comma are taken away
then we can say that
(a mod 50) + (a div 50)*50 = 123 **)
Regards
Batalf