bichorendon
Joined: 08 Sep 2005 Posts: 1
|
concatenar 3 numeros |
Posted: Fri Sep 09, 2005 1:49 pm |
|
|
coneste codigo concateno dos caracteres necesito concatenar 3 caracteres
lcd_putc("\fDay: ");
day=get2_bcd(); ///llama la operacion concatenar numeros entrantes
///en el keyboard
byte get2_bcd() {
char first,second;
do {
first=kbd_getc();
} while ((first<'0') || (first>'9'));
lcd_putc(first);
first-='0';
do {
second=kbd_getc();
} while ((second<'0') || (second>'9'));
lcd_putc(second);
ptr=strcat (fist,second);
return((first<<4)|(second-'0')); //retorna dos numeros concatenados
} |
|