符合中小企业对网站设计、功能常规化式的企业展示型网站建设
本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...
商城网站建设因基本功能的需求不同费用上面也有很大的差别...
手机微信网站开发、微信官网、微信商城网站...
口袋中有5种颜色的小球,每次从口袋中任意取3个,问得到3种不同颜色的小球的可能取法?
#define _CRT_SECURE_NO_WARNINGS 1 #include#include using namespace std; int main() { enum color{red,yellow,blue,white,black};//声明枚举类型color color pri; //定义color类型的变量pri int i, j, k,n = 0, loop; //n是累计不同颜色的组合数 for (i = red; i <= black; i++) { for (j = red; j <= black;j++) if (i != j) { for (k = red; k <= black;k++) if ((k != i) && (k != j)) { n = n + 1; cout << setw(3) << n; for (loop = 1; loop <= 3; loop++) { switch (loop) { case 1:pri = color(i); break; case 2:pri = color(j); break; case 3:pri = color(k); break; defaul:break; } switch (pri)//判断pri的值,输出相应的"颜色" { case red:cout << setw(8) << "red"; break; case yellow:cout << setw(8) << "yellow"; break; case blue:cout << setw(8) << "blue"; break; case white:cout << setw(8) << "white"; break; case black:cout << setw(8) << "black"; break; default:break; } } cout << endl; } } } cout << "total:" << n << endl;//输出符合条件的组合的个数 getchar(); return 0; }