C语言保留小数点后一位

#include<stdio.h> void main() { float a=1,b=2,c;//先定义一个实型数据 c=a/b; printf("%.1f\n",c);//重点在于%.1f } web
相关文章
相关标签/搜索