采用sprintf_s方法,转换数据类型; char ch[100]; double db; db=123456.7890; db2=db*8.0000; sprintf_s(ch,100,"%5.3f\n not %5.3f",db,db2); printf_s(ch); ……