空格将会作为各个数之间隔离的标志 scanf("%d%d", &a, &b); printf("%d%d", a, b); 如果输入“1a1” 将会得到17541648很明显是错误的 而输入“ 1 15 ” 将会得到115