Monday, December 10, 2007

How to work with the Binary Arithmetic Operators div and mod

How to work with the Binary Arithmetic Operators div and mod

To work with the Binary Arithmetic Operators div and mod

Example:

program Welcome;

uses

Wincrt;

var

a:integer;

b:integer;

begin

Writeln('Ente the two number: ');

Read(a);

Read(b);

Writeln('Answer is : ',a div b);

Writeln('Answer is : ',a mod b);

end.

Output:

No comments: