תודה לעוזרים
#include <stdio.h>#include <conio.h>main(){ int pressed = 0; int key = 0; while (!pressed) { if (_kbhit()) { key = _getch(); pressed = key == 13; } } return 0;}
#include <stdio.h>#include <conio.h>
main(){ int pressed = 0; int key = 0;
while (!pressed) { if (_kbhit()) { key = _getch(); pressed = key == 13; } }
return 0;}
char c;do c = getchar();while (c != '\n');
או שאם אין לך מה לעשות עם המידע פשוט:while(getchar() != '\n');
while(getchar() != '\n');