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:
Post a Comment