[an error occurred while processing this directive]
|
Если даже не использовать схему Горнера, то сократить можно если выбросить переменную индекса
unsigned int BCDtoBIN(void) //Преобразование BCD в BIN
{
unsigned int result = 0; //Результатresult = BCDnumber[0] ; //Единицы
result += BCDnumber[1] * 10; //Десятки
result += BCDnumber[2] * 100; //Сотни
result += BCDnumber[3] * 1000; //Тысячи
result += BCDnumber[4] * 10000; //Десятки тысячreturn result;
}
E-mail: info@telesys.ru