正在加载图片...
The C Programming language Chapter 5 Control Flow Notice ◆If( expression the value may be any type statement be compound statement as #include <stdio. h> main( a=b, x-Y) i int,y scanf(%od, %od,, &x, &y) if(x>y) cy, y-X Compile error else X++;y++; printf(%d, %dn”2x2y)The C Programming Language Chapter 5 Control Flow as: if (a==b&&x==y) printf(“a=b,x=y”); if (3) printf(“OK”); if (‘a’) printf(“%d”,’a’); Notice: ◆ If (expression) ◆ if (x)  if (x!=0) if(!x)  if(x==0) as: #include <stdio.h> main() { int x,y; scanf(“%d,%d”,&x,&y); if(x>y) x=y; y=x; else x++; y++; printf(“%d,%d\n”,x,y); } Compile Error! the value may be any type statement may be compound statement
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有