1.袋中有6红球 3黄球 3绿球,从中取6个球,求所有拿到球的颜色的可能 c(12,6)
#include<stdio.h> int main(int argc, char** argv)
{
int red = ;
int yellow = ;
int green = ;
int i = ;
int j = ; for ( i = ; i <= yellow; i++)
{
for (j = ; j <= green; j++)
{
//if ()
printf("red:%d, yellow:%d, green:%d\n", (-i-j), i, j);
}
} }