摘要:
参考资料: "C语言中产生随机数" 一:如果你只要产生随机数而不需要设定范围的话,你只要用rand()就可以了:rand()会返回一随机数值, 范围在0至RAND_MAX 间。RAND_MAX定义在stdlib.h, 其值为2147483647。 include include define ran 阅读全文
摘要:
"5 1" "5 2" include include include using namespace std; class Date { protected: int year; int month; int day; public: Date(int a = 0, int b = 0, int 阅读全文
摘要:
"5 1" "5 2" include include using namespace std; template class MySet { private: T data[100]; int count; public: MySet() { count = 0; }; int addSet(T 阅读全文
摘要:
先是自己凭借自己在课堂上的记忆打了一遍。自然出了错误。 include include using namespace std; class people { private: int age; int sex; // 1 girl 2 boy public: people(int a = 0, i 阅读全文
摘要:
"5 1" "5 2" include include include include using namespace std; class Group { protected: string name;//姓名 public: virtual void display()=0;//显示考核成绩 } 阅读全文
摘要:
"5 5" "5 4" ifndef STUDENT_H define STUDENT_H include include using namespace std; class Student { private: int height; int weight; public: string nam 阅读全文