填空题

下面的if语句与y=(x>=10)3*x-11:(x<1)x:2*x-1;的功能相同,请补充完整。
if( 【10】 )
if( 【11】 )y=2*x-1;
else y=x;
else y=3*x-11;

【参考答案】

【10】 x<10
【11】 x>=1
<上一题 目录 下一题>
热门 试题

填空题
以下程序中用户由键盘输入一个文件名,然后输入一串字符(用#结束输入)存放到此文件中,形成文本文件,并将字符的个数写到文件的尾部。请填空。 #include<stdio.h> main() FILE *fp; char ch,fname[32]; int count=0; printf(”Input the filename: ); scanf( %s ,fname); if((fp=fopen( 【12】 , w+ ))==NULL) printf( Can’t open file:%s n ,fname);exit(0); printf( Enter data: n ); while((ch=getchar())!=’#’) fputc(ch,fp);count++; fprintf( 【13】 , n%d n ,count); fclose(fp);
填空题
以下程序的输出结果是 【7】 。 #define MAX(x,y)(x)>(y)(x):(y) main() int a=5,b=2;c=3,d=3,t; t+MAX(a+,b,c+D) *10; printf( %d n ,t);
相关试题
  • 下面的函数strcat(str1,str2)实现将字...
  • 以下函数fun用于求两个整数a和b的最大公约...
  • 若已经定义int a=25,b=14,c=19...
  • 函数void fun(float*sn,int n)的功能...