逗号后面要有空格; 年不是整数,则变量 year 不能用 int,要用 float year; year 的输入语句格式 要用 %f: scanf("%f %f %f",&money,&year,&rate);