Difference between revisions of "Div"

From Free Pascal wiki
Jump to navigationJump to search
(New page: Div is division in which the fractional part (remainder) is discarded. It mean the integer part of the result of dividing two integers. == See also == * Mod)
 
(example, category)
Line 1: Line 1:
 
Div is division in which the fractional part (remainder) is discarded.
 
Div is division in which the fractional part (remainder) is discarded.
It mean the integer part of the result of dividing two integers.
+
It means the integer part of the result of dividing two integers.
 +
 
 +
Example:
 +
<syntaxhighlight>
 +
var
 +
i,j:integer;
 +
begin
 +
  i:=16;
 +
  j:=3;
 +
  writeln(inttostr(i div j));
 +
end;
 +
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
  
 
* [[Mod]]
 
* [[Mod]]
 +
 +
[[Category:FPC]]
 +
[[Category:Pascal]]

Revision as of 13:35, 16 September 2012

Div is division in which the fractional part (remainder) is discarded. It means the integer part of the result of dividing two integers.

Example:

var
i,j:integer;
begin
  i:=16;
  j:=3;
  writeln(inttostr(i div j));
end;

See also