>>177
int floor10(int val)
{
char buf[12];
sprintf(buf, "%d", val);
buf[strlen(buf) - 1] = '0';
return atoi(buf);
}