📅  最后修改于: 2022-03-11 14:59:47.104000             🧑  作者: Mango
int num;
char term;
if(scanf("%d%c", &num, &term) != 2 || term != '\n')
printf("failure\n");
else
printf("valid integer followed by enter key\n");