C程序设计课后分答案(谭浩强版).docVIP

  • 6
  • 0
  • 约1.3万字
  • 约 12页
  • 2016-10-12 发布于贵州
  • 举报
C程序设计课后分答案(谭浩强版)

有3个整数a,b,c,由键盘输入,输出其中最大的数。 #include stdio.h void main() { int a,b,c; printf(Please input any 3 numbers:\n); scanf(%d,%d,%d,a,b,c); if(ab) { if(ac) printf(the max number is %d.\n,a); else printf(the max number is %d.\n,c); } else { if(bc) printf(the max number is %d.\n,b); else printf(the max number is %d.\n,c); } } 5.5 #include stdio.h void main() { float x,y; printf(Please input x:\n); scanf(%f,x); if(x1) y=x; else { if(x10) y=2*x-1; else y=3*x-11; } printf(y=%f.\n,y); } 5.6 #include stdio.h void main() { int score,g

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档