大学c语言程序设计第二版本本(电子工业)第4章节.pptVIP

  • 1
  • 0
  • 约8.3千字
  • 约 30页
  • 2019-04-12 发布于湖北
  • 举报

大学c语言程序设计第二版本本(电子工业)第4章节.ppt

大学c语言程序设计第二版本本(电子工业)第4章节

实验教程P18页6题(if 单分支结构) #include stdio.h main( ) { int a=8,b=7,c=9,t=0; if(ab) {t=a;a=b;b=t;} if(ac) {t=a;a=c;c=t;} if(bc) {t=b;b=c;c=t;} printf(%5d%5d%5d\n,a,b,c); } kj17 { } 实验教程P18页6题(if 单分支结构) #include stdio.h main( ) { int a=8,b=7,c=9,t=0; if(ab) t=a;a=b;b=t; if(ac) t=a;a=c;c=t; if(bc) t=b;b=c;c=t; printf(%5d%5d%5d\n,a,b,c); } kj17a 实验教程P18页4题(if 多分支结构) #include “stdio.h” main( ) { int a=1,b=2,c=3,d=4; if(abc) printf(“%d\n”,d); else if((c-b)==a) printf(“%d\n”,2*d);

文档评论(0)

1亿VIP精品文档

相关文档