Printing an integer to an LCD

Hi,
the ascii-characters for numbers start at 48 (for 0) up to 57(for 9);

Easiest solution for a single digit is

int numbervalue=3;
char digit=(char)(numbervalue+48);

For a bigger (unsigned) int-value this here should work;

int value=12345; //for instance
//int on arduino has 5 digits maximum
char digits[5]={' ',' ',' ',' ',' '};
while(value>0) {
     char[4]=(char)((value%10)+48);
     value=value/10;
     char[3]=(char)((value%10)+48);
     value=value/10;
     char[2]=(char)((value%10)+48);
     value=value/10;
     char[1]=(char)((value%10)+48);
     value=value/10;
     char[0]=(char)((value%10)+48);
}
//now the number should be in the char array. Don't forget to handle the sign!

Eberhard