A.sprintf関数でけっこう楽に実現できます。簡単な例を以下に示します。
#include<stdio.h>
main(){
char s[20]; /* これくらい確保しておけばいいか(^_^; */
int hp=12,hpmax=30; /* 現在のHPとその最大値 */
sprintf(s,"%d / %d",hp,hpmax);
printf("HP:%s\n",s);
}
実行結果
HP:12 / 30