Raised This Month: $ Target: $400
 0% 

How dividing int by int works?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
geertjan88
Member
Join Date: May 2006
Old 12-25-2006 , 11:03   How dividing int by int works?
Reply With Quote #1

I got a question how dividing a int by an int works? Like for an example what is the result of dividing 13 by 2?
__________________
if i help? +karma!
geertjan88 is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 12-25-2006 , 14:58   Re: How dividing int by int works?
Reply With Quote #2

new Float:result = float(13)/float(2)
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
The Specialist
BANNED
Join Date: Nov 2006
Old 12-25-2006 , 14:59   Re: How dividing int by int works?
Reply With Quote #3

Except he wanted to know how dividing by an INTEGER . Not a Float.
The Specialist is offline
Send a message via AIM to The Specialist
cybermind
Senior Member
Join Date: Oct 2004
Old 12-25-2006 , 16:32   Re: How dividing int by int works?
Reply With Quote #4

Quote:
Originally Posted by Pawn Language Guide
Results in the division of e1 by e2. The result is truncated to the nearest integral value that is less than or equal to the quotient. Both negative and positive values are rounded down, i.e. towards −infinity.
13 / 2 = 6
-13 / 2 = -7
cybermind is offline
geertjan88
Member
Join Date: May 2006
Old 12-26-2006 , 08:27   Re: How dividing int by int works?
Reply With Quote #5

Quote:
Originally Posted by CyberMind View Post
13 / 2 = 6
-13 / 2 = -7
Thanks +karma for you...
__________________
if i help? +karma!
geertjan88 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode