怎样截取浮点数中部分小数位

    技术2022-05-19  20

    sprintf(tmp,"%.2lf",ave);       sscanf(tmp,"%lf",&ave);

    ave中为要操作的浮点数。

    tmp 为一字符数组。


    最新回复(0)