int len;
char number[2];
len = 0;
if ( ( ch = getch() ) != 0 )
switch ( ch )
{
case 51,52,53 : //3, 4, 5
{
if ( len != 1 )
{
len++;
number[1] = ch;
}
else {
len--;
number[1] = ch;
}
}
break;
default : break;
}
bar (600,100,620,110);
outtextxy (600, 100, number);
} while (ch != 13);
number[2] = '\0';
amount = atoi (number);
Сообщение отредактировано: Tan -