若变量已正确定义,下面程序段的输出结果是( )。#includemain(){float x=1.236547;printf("%f\n",(int)(x*1000+0.5)/(float)1000);}
举一反三
- 下列程序段的输出结果为().float x=213.82631; printf("%3d",(int)x);
- 中国大学MOOC: 下面程序段执行后的输出结果是( )。float x=-1023.012;printf("%8.3f,",x);printf("%10.3f",x);
- 以下程序的输出结果是。{int x=10;float pi=3.1416; printf("(1)%d\n",x); printf("(2)%6d\n",x); printf("(3)%f\n",56.1); printf("(4)%5.2f\n",pi); return 0;}
- 以下程序运行后的输出结果____ main { char c; int n=100; float f=10; double x; x=f*=n/=(c=50); printf(“%d%f ”, n, x); }
- 以下程序运行后的输出结果是____________。#include<;stdio.h>;float f(float x,float y){ x+=1;y+=x;return y;}main(){float a=1.6,b=1.8;printf("%f\n ", f(b-a,a));}