idlebrain
Advanced Member level 4
Re: C Algorithm Help Needed
What about the count 4 / 6 is passed as the argument.
DATA_A equals DATA(4)
DATA_B equals DATA(6)
What about the count 4 / 6 is passed as the argument.
DATA_A equals DATA(4)
DATA_B equals DATA(6)
Code:
void DATA(BYTE count)
{
BYTE j = 0, ECHO;
BYTE DATA[];
BYTE i = 0;
do
{
ECHO = getc();
if(ECHO != 0x0A && ECHO != 0x0D)
{
MESSAGE[j] = ECHO;
j++;
}
else
{
MESSAGE[j] = ECHO;
j++;
i++;
}
} while(i < count);
}