/*第一题*/

#include<stdio.h>
//输入1.2345   输出1.2000
//输入1.2547   输出1.3000
main(){
    double input=0;
    printf("请输入:\n");
    scanf("%lf",&input);
    printf("输入的是:%lf\n",input);
    input=input*10;
    int m=0;
    m=(int)(input+0.5);
    double n=(double)m;
    n=n/10;
    printf("输出结果:%lf\n",n);
}

 

相关文章:

  • 2021-11-18
  • 2021-10-21
  • 2021-10-29
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案