C/Console/Console Read Any — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
(нет различий)
|
Текущая версия на 13:22, 25 мая 2010
Press any key to exit: kbhit()
<source lang="cpp">
- include <stdio.h>
- include <conio.h>
int main(void) {
double amount; amount = 0.20; cprintf("Printing 5-percent tax table\n\r"); cprintf("Press a key to stop.\n\n\r"); do { cprintf("amount: %f, tax: %f\n\r", amount, amount * 0.05); if(kbhit()) break; amount = amount + 0.20; } while(amount < 100.0); return 0;
}
</source>