C语言大学教程--第四章-C程序控制.pptVIP

  • 77
  • 0
  • 约2.36万字
  • 约 124页
  • 2019-03-03 发布于北京
  • 举报
习题12 答案: d=20 以下程序的执行结果是( )。 #include stdio.h void main( ) { int a,b,c,d,x; a=c=0; b=1; d=20; if (a) d=d-10; else if(!b) if (!c) x=15; else x=25; printf(d=%d\n,d); } 习题13 答案: s=2,t=3 以下程序在输入5,2 之后的执行结果是( )。 #include stdio.h void main( ) { int s,t,a,b; scanf(%d,%d,a,b); s=1; t=1; if (a0) s=s+1; if (ab) t=s+t; else if (a==b) t=5; else t=2*s; printf(s=%d,t=%d\n,s,t); } 习题14 答案: ?? 2 执行下面程序时,若从键盘输入2CR,则程序的运行结果是( )。 #include stdio.h void main( ) { int k; char c

文档评论(0)

1亿VIP精品文档

相关文档