Tag Archives C++

流水账No.130612
18,457 views, 31 Comments

上次主题卖了一点钱, 今天给家里每人买了份礼物 也只有在拿自己赚的钱给家人买东西的时候才深深体会到钱不够用这四个字 哎, 想起那句经典的话, 都怪我无能让你跟着我受苦. 顺便记点别的, MinGW跑cpp找不到iostream是因为没配置环境变量, 跑出来一串临时文件夹是因为用了gcc, 跑cpp应该用g++, 妈的太小白了, 真想剁手. Read More

全排列计数
16,352 views, 20 Comments

数字1,2,3总共有多少种组合方式? #include <stdio.h> int main () { printf("1,2,3组合:rn"); int a,b,c,d; d=0; for(a=1;a<4;a++) for(b=1;b<4;b++) for(c=1;c<4;c++) { if(a!=b&&a!=c&&b!=c){ d++; printf("%d%d%d,",a,b,c); } } printf("rn总共%d个",d); } falla@ubuntu:~/桌面$ gcc 3.c falla@ubuntu:~/桌面$ ./a.out 1,2,3组合: 123,132,213,231,312,321, ... Read More

C++