Raised This Month: $ Target: $400
 0% 

Last Digit from a Integer


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-10-2010 , 20:40   Re: Last Digit from a Integer
Reply With Quote #3

Quote:
Originally Posted by wrecked_ View Post
I assume it'd be something like this.
Code:
new i = 26 new number[] = num_to_str( i ) new lastdigit = number[ sizeof number - 1 ]
Suck Method.

PHP Code:
stock get_last_num( const int )
{
    return 
int 10 * (int 10);

I think that is correct. Just Test. I don't!!!



EDIT: Exolent method rocks!!
__________________

Last edited by AntiBots; 03-10-2010 at 20:48. Reason: EDIT
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
 



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 19:49.


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