#### how do I do an integer divide?

```Hi All,

How do I do and integer divide?

By that I mean I want only the whole number and
not the decimal point or the fraction.

21 DIV 4 = 5   (not 5.25)
21 %   4 = 1   (remainder = 1)

Many thanks,
-T
```
 0
ToddAndMargo
4/13/2018 10:06:30 AM
perl.perl6.users 1100 articles. 0 followers.

3 Replies
41 Views

Similar Articles

[PageSpeed] 41

```--00000000000019444b0569b81244
Content-Type: text/plain; charset="UTF-8"

It's div (lowercase) so 21 div 4 = 5 :)

On Fri, 13 Apr 2018 at 11:07 ToddAndMargo <ToddAndMargo@zoho.com> wrote:

> Hi All,
>
> How do I do and integer divide?
>
> By that I mean I want only the whole number and
> not the decimal point or the fraction.
>
> 21 DIV 4 = 5   (not 5.25)
> 21 %   4 = 1   (remainder = 1)
>
>
> Many thanks,
> -T
>

--00000000000019444b0569b81244
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">It&#39;s div (lowercase) so 21 div 4 =3D 5 :)<br></div><br=
><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 13 Apr 2018 at 11:07 T=
oddAndMargo &lt;<a href=3D"mailto:ToddAndMargo@zoho.com">ToddAndMargo@zoho.=
com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
How do I do and integer divide?<br>
<br>
By that I mean I want only the whole number and<br>
not the decimal point or the fraction.<br>
<br>
21 DIV 4 =3D 5=C2=A0 =C2=A0(not 5.25)<br>
21 %=C2=A0 =C2=A04 =3D 1=C2=A0 =C2=A0(remainder =3D 1)<br>
<br>
<br>
Many thanks,<br>
-T<br>
</blockquote></div>

--00000000000019444b0569b81244--
```
 0
simon
4/13/2018 10:09:31 AM
```>> On Fri, 13 Apr 2018 at 11:07 ToddAndMargo <ToddAndMargo@zoho.com
>> <mailto:ToddAndMargo@zoho.com>> wrote:

>>     How do I do and integer divide?

On 04/13/2018 03:09 AM, Simon Proctor wrote:
> It's div (lowercase) so 21 div 4 = 5 :)
>

That was easy.  Thank you!

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
 0
ToddAndMargo
4/13/2018 8:18:58 PM
```--000000000000c135c50569c9e66b
Content-Type: text/plain; charset="UTF-8"

That's actually in the documentation https://docs.perl6.org/routine/div

Cheers

JJ

--000000000000c135c50569c9e66b
Content-Type: text/html; charset="UTF-8"

<div dir="ltr"><div>That&#39;s actually in the documentation <a href="https://docs.perl6.org/routine/div">https://docs.perl6.org/routine/div</a><br></div><br><div class="gmail_extra">Cheers<br><br></div><div class="gmail_extra">JJ<br></div></div>

--000000000000c135c50569c9e66b--
```
 0
jjmerelo
4/14/2018 7:26:03 AM