passing value to a function

I tried various ways but no success,

Post something that actually compiles, in code tags.

Or post something that doesn't and post the errors you get.

Meanwhile, google sprintf().