华科周纯杰版c语言答案.docxVIP

  • 88
  • 0
  • 约2.83万字
  • 约 46页
  • 2019-02-26 发布于广东
  • 举报
第三章程序和流程控制 输入两个整数,输出较大者。 #includestdio.h void main() { int a.b; int max=0; printf(MPlease in put two numbers:11); scanf(”%d%d,a,b); if(a=b) max=b; else max=a; printf(MThe larger number is %d\nn,max); } 冇3个整数a, b, c,由键盘输入,输出英中最大的数。 includestdio.h void main() { int a,b,c,max; printf(HPlease in put three numbers:0); scanf(”%d%d%d“,a,b,c); if(ab) { if(ac) max=a; else max=c; } else { if(bc) max=b; else max=c; } printf(MThe largest number is %d\n,\temp); } 从1累加到100,用while语句。 includcstdio.h #define N 100 void main() int i=hsum=O; while(i=N) { sum+=i; i++; } printf(sum:%d\n\sum); } 已知 al = 10, a2 =_3

文档评论(0)

1亿VIP精品文档

相关文档