不要直接用getchar()获取op,很危险。
getchar()
op
得加一个while
while
while (op != 'Q' and op != 'R') { op = getchar(); }