模拟骰子的6000次投掷,编程统计并输出骰子的6个面各自出现的概率。按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。()
#include _________
#include
#include
int main()
{
int face, roll, frequency[7] = {0};
srand(time (NULL));
for (roll=1; roll<=6000; roll++)
{
face = _____________;
__________________;
}
printf("%4s%17s
", "Face", "Frequency");
for (face=1; face<=6; face++)
{
printf("%4d%17d
", face, frequency[face]);
}
return 0;
}
#include _________
#include
#include
int main()
{
int face, roll, frequency[7] = {0};
srand(time (NULL));
for (roll=1; roll<=6000; roll++)
{
face = _____________;
__________________;
}
printf("%4s%17s
", "Face", "Frequency");
for (face=1; face<=6; face++)
{
printf("%4d%17d
", face, frequency[face]);
}
return 0;
}
举一反三
- 模拟骰子的6000次投掷,编程统计并输出骰子的6个面各自出现...face]); } return 0;}
- If the light ratio on the subject’s face is 4:1, the bright part on the subject’s face is ______times bigger than the dark part. A: 2 B: 8 C: 4 D: 1/4
- 【单选题】Face changing is a unique skill of Sichuan Opera. Which of the following is not a technique of face changing? A. Face wiping B. Face blowing C. Face pulling D. Face punching
- 子函数Change的功能是将英文大写字母转换为小写字母,下面程序的输出结果是 abc_abc_def 按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。 #include void Change(__________) { for(;________;ch++) { if(____________) _________________; } } int main() { char s[]="ABC_abc_DEF"; Change(s); printf("%s ",s); return 0; }
- During the whole TV interview, the middle-school girl student never once looked me ______ A: in face B: on the face C: in the face D: to the face