题目内容
抽奖游戏。编一程序从键盘上输入任一个(0-100)以内的两位数,机器随机产生一个数如果两个数相等即为胜者。要求:(1)用模块化编程思想,定义一个函数判断是否为获奖者,主函数只需要获得数据调用函数判断即可;(2)在编写函数时,需要调用产生随机数的库函数srand()和rand()。(3)运行结果示例:运行结果:Please enter your data:77↙the computer's data is 46You are loser!Again?(1/0)1↙Please enter your data:49↙the computer's data is 49You are winner!Again?(1/0)0↙
查看答案
搜索结果不匹配?点我反馈