|
[讨论]DEV C++中初学者编程 共同学习者顶起来
//杨辉三角 #include<stdio.h> #include<math.h> main() { int a[10][10]; int i,j; for(i=0;i<=9;i++) { a[i][0]=1; for(j=0;j<=i;j++) { if(j>=1&&j<=i-1) a[i][j]=a[i-1][j-1]+a[i-1][j]; a[i][i]=1; printf("%5d",a[i][j]); } printf("\n"); } getchar(); } |
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
思而不学者殆 |
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
顶顶顶顶顶顶顶 |
|
|
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
支持到永远~ |
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
我来顶一个 大家支持下~ |
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
哈哈哈哈哈哈哈哈哈 |
|
|
|
|
|
[求助]如何学习WinAPI
没看过 ..... |
|
|
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
#include "stdio.h" main() { int i,j,n; printf("\nPlease Enter n:"); scanf("%d",&n); for(i=1;i<=n;i++) {for(j=1;j<=n+i-1;j++) if(j>n-i) printf("*"); else printf(" "); printf("\n"); } for(i=1;i<n;i++) {for(j=1;j<2*n-i-1;j++) if (j>i) printf("*"); else printf(" "); printf("\n"); fflush(stdin); getchar(); } } P112的5-5 |
|
[求助]百鸡问题
如果钱可以不用完该怎么解 |
|
[求助]百鸡问题
如果钱可以不用100个该怎么解 |
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
#include "stdio.h" #include "conio.h" int main() { int male; int female; int baby; for(male=0;male<100/5;male++) for(female=0;female<100/3;female++) for(baby=0;baby<100;baby+=3) { if(male+female+baby == 100 && 5*male+3*female+baby/3 == 100) printf(" cock hen baby\n %d %d %d",male,female,baby) } printf("Hello, world\n"); getch(); } |
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
#include <stdio.h> main() { int cocks=0,hens,chicks; while(cocks<=20) { hens=0; while(hens<=33) { chicks=100-cocks-hens; if(5.0*cocks+3.0*hens+chicks/3.0==100.0) printf("公鸡%d只,母鸡%d只,小鸡%d只\n\n",cocks,hens,chicks); hens++; } cocks++; } getchar(); } |
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
#include "stdio.h" #include "math.h" main() { int y=10; while(y--);/*这里循环的是空语句*/ /*y++是先运行在变值*/ printf("y=%d\n",y); getchar(); } |
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
#include "stdio.h" #include "math.h" main() { int a,b,c,t; scanf("%d,%d,%d",&a,&b,&c); if(a>b) t=a,a=b,t=b; if(b>c) t=b,b=c,c=t; if(a>b) t=a,a=b,t=b; printf("%d,%d,%d",a,b,c); fflush(stdin); getchar(); } |
|
|
|
[讨论]DEV C++中初学者编程 共同学习者顶起来
/*P87 12T */ /* #include "stdio.h" #include "math.h" main() { int i=1,j=2,k=3; if(i++==1&&(++j==3||k++==3)) printf("%d%d%d\n",i,j,k); getchar(); }*/ /*P87 13T*/ /* #include "stdio.h" #include "math.h" main() { int a=3,b=4,c=5,d=2; if(a>b) if(b>c) printf("%d",d++ +1); else printf("%d",++d +1); printf("%d",d); getchar(); }*/ /*P88 16T*/ /* #include "stdio.h" #include "math.h" main() { char k; int i; for(i=1;i<3;i++) { scanf("%c",&k); switch(k) { case '0': printf("another\n"); case '1': printf("number\n"); } } fflush(stdin); getchar(); } */ 输出的答案与讲的不同啊 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值