- gets()和getcar()的区别运用,目前还不会
- 在以下代码中,每一行第一个数的首位是没有空格的,难道是接受了上一行的回车?
https://www.cnblogs.com/hebust/p/9491370.html
#include<stdio.h>
int main()
{
int n;
scanf("%d", &n);
n *= 4;
while(n--) {
char topics, ans;
scanf(" %c-%c", &topics, &ans); //第一个数的回车怎么接受掉的?
if (ans == 'T')
printf("%d", topics - 'A' + 1);
}
return 0;
}