View Single Post
Old Mar 31st, 2005, 10:54 PM   #11
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Program 1)

[php]
int findRightMostInt(int number) {
char tmp[100];
snprintf(tmp, 100, "%d", number);
number = strlen(tmp) - 1;
while(tmp[number] == '0') number--;
return atoi(tmp[number]);
}
[/php]
tempest is offline   Reply With Quote