把scanf("%c", &st)改为scanf(" %c", &st);即%c前加一个空格,用来忽略前导空白符(包括空格、tab、回车)
scanf("%c", &st)
scanf(" %c", &st);
%c