Just a guess because I'm not sure which processor or compiler you are using: 'buf' appears to be a number of some type, is your lcd_write_char routine expecting a character like it's name suggests?
You might have to convert the number to it's ASCII equivalent or use 'sprintf' to turn it into a string.
Get a look here: https://www.edaboard.com/blog/1784/
In the comments I have posted a function that would return the C string of the number, which can be used to be printed on LCDs.
You are modifying the value in 'buf' with your first statement 'buf = buf %10'
Instead you should use some temp variable so that buf doesn't get modified.
Also - i assume that the first argument in lcd_write_char() is the position from the left ? If so, the you need to swap the 2 position numbers 10 <--> 11.
10 is on the left (most sig digit) and 11 on the right.
Lastly - the earlier comment about converting to ascii code is valid. You need to add 48 (0x30) to convert to ascii codes, unless your lcd_write routine already does this (which it probably doesn't)