正在加载图片...
The C Programming language Chapter 5 Control Flow 例求一个数的绝对值 ch5 1.c*/ #include <stdio h main( printf("Enter an integer scanf("%od", &x) if(y<o printf( integer: %/od--->absolute value: %odn"x ,y) Enter an integer:-12 integer: -12--->absolute value: 12The C Programming Language Chapter 5 Control Flow /*ch5_1.c*/ #include <stdio.h> main() { int x,y; printf("Enter an integer:"); scanf("%d",&x); y=x; if(y<0) y= -y; printf("\ninteger:%d--->absolute value:%d\n",x,y); } 例 求一个数的绝对值 Enter an integer: -12 integer:-12--->absolute value :12
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有