⑴ 急求c语言编程问题!!!
第一题:题目不是很明确。我觉得答案是0.7
第二题:
#include<stdio.h>
voidmain()
{
intred,yellow,green;
for(red=0;red<=3;red++)
for(yellow=0;yellow<=3;yellow++)
for(green=0;green<=6;green++)
{
if(red+yellow+green==8)
printf("红色:%d,黄色:%d,绿色:%d ",red,yellow,green);
}
return;
}