• shiyan.5.3.cpp

    在博弈论中,有一种决策称为Best Response,通俗的意思就是选择一种策略使得团体利益最大化。C语言学习成绩的评定方式分为两种,一种是自由刷题模式(compete),没有固定标准,刷题越多者排名越靠前,其期末分数越高;另一种是规定每个人必须做够多少道题(standard),达到要求就能取得相应分数。 假设一个班级中的学生分为A、B两类,A类同学学习热情很高,乐于做题,采用compete模式可以获得成就感并且在期末拿到高分,compete模式可以让他们有10分的收益;采用standard模式他们也可以在期末拿到高分,但不能满足他们的求知欲,standard模式可以让他们有8分的收益。B类同学仅仅希望期末拿高分,如果采用compete模式,他们竞争不过A类同学,期末成绩不理想,因此compete模式能给他们6分的收益;如果采用standard模式,他们可以完成规定任务并拿到高分,因此standard模式可以让他们有10分的收益。 编程输入A类和B类同学分别占班级总人数的百分比,分别计算并输出采用compete和standard两种刷题模式下的全班总收益,并输出这个班级在这场博弈中的Best Response是哪种模式。 【注】程序中使用的数据类型为float 程序运行结果示例1: Input percent of A and B:0.2 0.8↙ compete = 6.8000 standard = 9.6000 The Best Response is standard! 程序运行结果示例2: Input percent of A and B:0.8 0.2↙ compete = 9.2000 standard = 8.4000 The Best Response is compete! 程序运行结果示例3: Input percent of A and B:0.5 0.5↙ compete = 8.0000 standard = 9.0000 The Best Response is standard! 输入提示信息:"Input percent of A and B:" 输入格式:"%f%f" 输出格式:"compete = %.4f\nstandard = %.4f\n" 输出提示信息:"The Best Response is compete!" 输出提示信息:"The Best Response is standard!"

    0
    200
    527B
    2020-06-03
    9
  • shiyan.5.1.cpp

    1.身高预测系统的开发。 题目内容: 研究表明,人的身高与遗传因素有一定的关系。可以按照下面的公式,预测遗传身高(不考虑后天因素)。请据此设计一套身高预测系统,要求配有系统界面,可以支持用户选择性别。 男性成人时身高=(fa_Height + mo_Height)×0.54 cm 女性成人时身高=(fa_Height×0.923 + mo_Height) / 2 cm 这里fa_Height和mo_Height分别表示父亲和母亲的身高,单位均为cm。 以下为程序的运行结果示例1: ************************************* * Welcome to Use Height Prediction System * ************************************* Please choose the sex: 1. Female 2. Male Your choice is: 1↙ May I know your Surname? Ma↙ Hi, Miss Ma! Could you please input your mother’s height(cm): 153↙ Could you please input your father’s height(cm): 169↙ Your predicted height is 154cm Thank you for use our “Height Prediction System”! 以下为程序的运行结果示例2: ************************************* * Welcome to Use Height Prediction System * ************************************* Please choose the sex: 3. Female 4. Male Your choice is: 2↙ May I know your Surname? Li↙ Hi, Mr Li! Could you please input your mother’s height(cm): 162↙ Could you please input your father’s height(cm): 175↙ Your predicted height is 181 cm Thank you for use our “Height Prediction System”!

    0
    695
    1KB
    2020-06-02
    42
  • zuoye.5.cpp

    输入10个学生5门课的成绩,分别用函数实现下列功能: (1)计算每个学生的平均分; (2)计算每门课程的平均分; (3)找出所有50个分数中最高的分数所对应的学生和课程; (4)计算平均分方差: 其中,xi为某一学生的平均分。

    0
    850
    1KB
    2020-05-23
    29
  • 习惯养成

    连续回答技能树练习题 1 天,每天答对至少 1 题
  • 分享小兵

    成功上传3个资源即可获取
  • 分享学徒

    成功上传1个资源即可获取
关注 私信
上传资源赚积分or赚钱