Raised This Month: $ Target: $400
 0% 

Problem with quotient [SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 12-27-2012 , 16:43   Problem with quotient [SOLVED]
Reply With Quote #1

Hi everyone,

I want to get all number except last digit.
Example:
Code:
16 = 1
19 = 1
26 = 2
31 = 3
49 = 4
71 = 7
189 = 18
12944 = 1294
This is my method:
PHP Code:
new coolmod;

cool random_num(110000); // Ex: 116
mod cool 10// 6

cool = (cool mod) / 10// 116 - 6 = 110 / 10 = 11 
Exist another (better) way ?


Thanks in advanced!

Last edited by Kiske; 12-27-2012 at 16:44.
Kiske is offline
Send a message via Skype™ to Kiske
Kiske
Veteran Member
Join Date: May 2009
Old 12-27-2012 , 17:06   Re: Problem with quotient
Reply With Quote #2

LOL
PHP Code:
new mod cool 10
Thanks gladius..

Solved.

Last edited by Kiske; 12-27-2012 at 17:07.
Kiske is offline
Send a message via Skype™ to Kiske
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 13:45.


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