Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码改进 #12

Open
mktbhhh opened this issue Dec 16, 2021 · 0 comments
Open

代码改进 #12

mktbhhh opened this issue Dec 16, 2021 · 0 comments

Comments

@mktbhhh
Copy link

mktbhhh commented Dec 16, 2021

ch4/UVa1589.cc
第118行应修改为:
scanf(" %c%d%d", &type, &(p.x), &(p.y));

原答案未在%c前添加空格,不添加空格时上一次输入的回车存在于缓冲区中,导致type读取为'\n'

@mktbhhh mktbhhh changed the title 代码错误 代码改进 Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant