• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
fallen_leaves
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2019年7月13日

一个家庭两个孩子,已知一个是女孩,另一个是女孩的概率是?C++
摘要: 1 #include <ctime> 2 #include <iostream> 3 #include <algorithm> 4 5 using namespace std; 6 7 class family{ 8 public: 9 family(int cnt = 10000) :cnt(cn 阅读全文
posted @ 2019-07-13 09:18 鸿钧三清 阅读(772) 评论(0) 推荐(0)
 
全班50个人,俩个人生日在同一天的概率是?C++
摘要: #include #include #include using namespace std; class birthday{ public: birthday(int n = 10000, int m = 50) : n(n), m(m){ } void test(){ srand((unsigned)time(nullptr)); ... 阅读全文
posted @ 2019-07-13 09:08 鸿钧三清 阅读(691) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3