原创 第五週實驗報告 任務二
/* (程序頭部註釋開始) * 程序的版權和版本聲明部分 * Copyright (c) 2011, 煙臺大學計算機學院學生 * All rights reserved. * 文件名稱:分數類
原创 第六週 任務一 方法2
#include <iostream> using namespace std; class C { private: int x; public: C(int x){this->x = x;} int getx()const{re
原创 第四周實驗報告 任務三
#include <iostream> #include <string> using namespace std; class NaturalNumber { private: int n; public:
原创 第四周實驗報告 任務一
/* (程序頭部註釋開始) * 程序的版權和版本聲明部分 * Copyright (c) 2011, 煙臺大學計算機學院學生 * All rights reserved. * 文件名稱:三角形類
原创 第三週任務三
#include <iostream> using namespace std; class Time { public: void set_t
原创 第五週實驗報告 任務三
/* (程序頭部註釋開始) * 程序的版權和版本聲明部分 * Copyright (c) 2011, 煙臺大學計算機學院學生 * All rights reserved. * 文件名稱:
原创 任務三
/*(3‐1)輸入一行字符,統計其中有多少個單詞。每兩個單詞之間以空格(可能多個)隔 開,或者由標點符號(只考慮 , . ; ? !共 5 種)隔開。 如輸入: How old are your? I am 20. 輸出
原创 輸出組合數
/*(2‐1)組合數求解公式爲C = 。編程序輸入 m,n,輸出組合數,要求用自定義 m nmn!(.- )! 函數實現求階乘。 * 算法
原创 第六週 任務一 方法1
#include <iostream> using namespace std; class C { private: int x; public: C(int x){this->x = x;} int getx(){return
原创 C++作業 十進制轉換爲二進制
課外自學要求:自抽時間,全面複習完第1、2 章內容,目標是在閱讀程序和編寫程序時, 不會在變量、常量、表達式、運算符等方面出現障礙,爲全面複習打
原创 第五週實驗報告 任務一
/* (程序頭部註釋開始) * 程序的版權和版本聲明部分 * Copyright (c) 2011, 煙臺大學計算機學院學生 * All rights reserved. * 文件名稱:類的初始化
原创 第六週 任務二
#include<iostream> using namespace std; class A { private: int a; public: A(){a = 0;} A(int aa):a(aa){} v
原创 第六週實驗報告 任務三
#include<iostream> #include<cmath> using namespace std; enum SymmetricStyle { axisx,axisy,point};//分別表示按x軸, y軸, 原點對稱 cl
原创 第七週 任務三
#include <iostream> using namespace std; template <class numtype> class Complex { public: Complex(
原创 第九周 任務一
#include <iostream> using namespace std; class CTime { private: unsigned short int hour; //