代码没有问题。但你写的输入语句是scanf("%d %d,%d",&a,&b,&c);,那么输入时第一个数与第二个数之间应当用空格隔开,而第二个数与第三个数之间应当用逗号隔开。
if else if else if ....else