填空题

下列程序的功能是计算机平均成绩并统计90分以上的人数。
main ( )
int n,m;
float grade, average;
average=n=m= 【13】 ;
while( 【14】 )
scanf("%f", &grade);
if (grade<0) break;
m++;
average+=grade;
if (grade<90) 【15】 ;
m++;
)
if(n) printf("%.2f %d\n",average/n,m);

【参考答案】

(13) 0 (14) 1 (15) continue
<上一题 目录 下一题>
热门 试题

填空题
下列程序的功能是计算机一元二次方程的根。 #include 【10】 #include <stdio.h> main ( ) float a, b, c, disc, x1, x2, realpart, imagpart; scanf( %f%f%f ,&a,&b,&c); printf( The equation ); if( 【11】 <=1e-6) printf( is not quadratic n ); else disc=b*b-4*a*c; if (fabs (disc) <=1e-6) printf( has two equal roots:%-8.4f n ,-b (2*a)); else if( 【12】 ) x1= (-b+sqrt (disc)) (2*a); x2= (-b-sqrt (disc)) (2*a); printf( has distinct real roots:%8.4f and %.4f n ,xl,x2); else realpart=-b (2*a); imagpart=sqrt (-disc) (2*a); printf( has complex roots: n ); printf ( %8.4f+%. 4fi n , realpart, imagpart); printf ( %8.4f-%. 4fi n , realpart, imagpart);
填空题
设在主函数中有以下定义和函数调用语句,且fun函数为void类型;请写出fun函数的首部 【9】 (要求形参名为b)。 main() double s[10][22]; int n; …… fun (s); ……
相关试题
  • 2个指针变量不可以______。
  • 下列语句中,不正确的是______。
  • 若变量a、i已正确定义,且i已正确赋值,合...
  • 在具有n个结点的二叉排序树上插入一个新结...
  • 下列可作为C语言赋值语句的是______。