Fri Nov 15 2024 17:37:48 GMT+0000 (Coordinated Universal Time)
Saved by @Bantling21
/* * Clears the keyboard if an invalid input was put in */ void clear_keyboard_buffer(void) { char c = 'a'; while (c != '\n') { scanf("%c", &c); } return; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments