日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

c语言程序运行结果怎么看,c语言程序的运行结果.ppt

發布時間:2023/12/20 编程问答 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c语言程序运行结果怎么看,c语言程序的运行结果.ppt 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

c語言程序的運行結果

寫出程序的運行結果輔導 例1:寫出下列程序的運行結果: #include main() {float x,y; scnf(“%f”.&x); if(x<0.0) y=0.0; else if ((x<5.0)&&(x!=2.0)) y=1.0/(x+2.0); else if(x<10.0) y=1.0/x; else y=10.0; printf)”%f\n”,y); } 例2:寫出下列程序的運行結果: #include main() {int num=0; while(num<=2) {num++; printf(“%d\n”,num);} } 例3:寫出下列程序的運行結果: #include main() {int a,b; for(a=1,b=1;a<=100;a++) {if(b>=20) break ; if(b%3==1) {b+=3; continue; } b-=5; } Printf(“%d\n”,a); } 例4:寫出下列程序的運行結果: #include main() {int x=1,y=0,=0,b=0; switch(x) {case 1: switch(y) {case 0: a++;break case 1: b++;break; } case 2: a++;b++;break; printf(“%d %d\n”,a,b); } #include main() {int k=4,m=1,p; p=func(k,m); printf(“%d, ”p); p=func(k,m); printf(“%d\n”p); } 例6:寫出下列程序的運行結果: int d=1; fun(int p) { int d=5; d+=p++; printf(“%d ”,d); } main() {int a=3; fun(a); d+=a++; printf(“%d\n”,d); } 例7:寫出下列程序的運行結果: #include main() {int i,j,row,column,m; static int array[3][3]={{100,200,300}, {28,72,-30}, {-850,2,6}}; m=array[0][0]; for(i=1;i<3;i++) for(j=0;j<3;j++) if(array[i][j] main() {long n; long f(long); scanf(“%ld”,&n); printf(“ld”,f(n)); } long f(long n) {if(n==1||n==2) return(1); else return(f(n-1)+f(n-2)); } 例9:寫出下列程序的運行結果: #include #define SUB(X,Y) (X)*Y main() {int a=3,b=4; printf(“%d\n”,SUB(a++,b++)); } 例10:寫出下列程序的運行結果: #include #include void fun(char *w,int m) {char s,*p1,*p2; p1=w;p2=w+m-1; while(p1

總結

以上是生活随笔為你收集整理的c语言程序运行结果怎么看,c语言程序的运行结果.ppt的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。