#include <stdio.h> int main(){ int x, y; char sign; while(scanf("%d %c",&x, &sign) != EOF){ int result = 1; //阶乘时使用 if(sign == '!'){ for (int i = 1; i <= x; ++i) { result *= i; } printf("%d\n", result); ...