原创 簡單查找小寫字母
#include<iostream> #include<cstring> #include<cstdlib> #include<cctype> using namespace std; int main() { char arr[
原创 簡單的動態輸入數組2
#include<iostream> #include<cstdlib> using namespace std; int main(){ int n,sum=0,i=0; cout<<"請輸入計算的個數爲:";
原创 簡單求圓半徑周長代碼
#include<iostream> using namespace std; #define pi 3.14 class Circle{ private: double x; public: do
原创 arrfun
#include<iostream> const int ArSize =8; using namespace std; int sum_arr(int arr[],int n); int main() { int cookies
原创 簡單二叉排序樹
寫的屬實不好,還有輸出真的不好看 #include<iostream> #include <malloc.h> #include<stdio.h> using namespace std; typedef struct Node{
原创 簡單折半算法
#include<iostream> #define maxsize 100 using namespace std; typedef struct{ int list[maxsize]; int length; }Tab
原创 簡單查找算法
#include<iostream> using namespace std; #define Maxsize 100 typedef struct{ int list[Maxsize]; int length; }Tab
原创 class和project(類和對象)
#include<iostream> #include<ctime> using namespace std; class myclock{ public: int sec,min,time;//成員函數,秒分時
原创 自定義數據類型
#include<iostream> #include<string> using namespace std; typedef double weight,tall; struct student{ int number;
原创 簡單結構struct
#include<iostream> #include<string> using namespace std; struct student{ int number; int score; string name
原创 HANOI 漢諾塔
#include<iostream> using namespace std; void hanoi(int, int, int, int); // 函數原型 void hanoi(int n, int p1, int p2, int p
原创 簡單傳址函數
#include<iostream> using namespace std; int sum(int &, int &); int main() { int main_a,main_b; cout<<"請輸入兩個數字:"
原创 簡單字符串的輸入輸出
#include<iostream> #include<cstdlib>//裏面封裝了許多函數, //例如malloc,free這些動態分配內存函數等等, //如果你不引
原创 動態分配內存
#include<iostream> #include<ctime> #include<cstdlib> using namespace std; int main() { int num; srand(time(NULL
原创 今天是數據結構的鄰接表
先貼上今天的代碼—圖中的鄰接表 #include<iostream> using namespace std; class list { public: int val; class list *next;