一个家庭两个孩子,已知一个是女孩,另一个是女孩的概率是?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
阅读全文
全班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)); ...
阅读全文