原创 【小練習】鐵軌

文章目錄1.練習代碼2.關鍵點分析2.1題目2.2分析2.3運行結果 1.練習代碼 #include "stdafx.h" #include <stdio.h> #include <iostream> #include <stack>

原创 【小練習】小球下落

文章目錄1.練習代碼2.關鍵點分析2.1題目2.2題目分析2.3代碼走讀2.4運行結果 1.練習代碼 #include "stdafx.h" #include <string.h> #include <stdio.h> #includ

原创 【小練習】順序表的就地逆置

文章目錄1.練習代碼2關鍵點分析2.1題目要求2.2題目分析2.3代碼走讀2.4運行結果 1.練習代碼 #include "stdafx.h" #include <stdio.h> #include <iostream> typede

原创 【小練習】卡片遊戲

文章目錄1.練習代碼2.關鍵點分析2.1題目2.2分析2.3代碼走讀2.4運行結果 1.練習代碼 #include "stdafx.h" #include <stdio.h> #include <iostream> #include

原创 【小練習】面向對象_成員變量1

文章目錄1.練習代碼2.關鍵點分析2.1執行過程2.2運行結果 1.練習代碼 #include "stdafx.h" #include <iostream> #include <string> using namespace std;

原创 【小練習】循環、遞歸與概率:遞歸

文章目錄1.練習代碼2.關鍵點分析2.1遞歸過程2.2運行結果 1.練習代碼 #include "stdafx.h" #include <iostream> #include <stdio.h> using namespace std

原创 【小練習】循環、遞歸與概率:for循環

文章目錄1.練習代碼2.關鍵點分析2.1處理過程2.2運行結果 1.練習代碼 #include "stdafx.h" #include <iostream> #include <stdio.h> using namespace std

原创 【小練習】STL模板與容器_容器2

文章目錄1.練習代碼-vector容器常規操作2.關鍵點分析2.1處理過程2.2運行結果 1.練習代碼-vector容器常規操作 #include "stdafx.h" #include <iostream> #include <st

原创 【小練習】STL模板與容器_容器1

文章目錄1.練習代碼-vector容器常規操作2.關鍵點分析2.1 處理過程2.2運行結果 1.練習代碼-vector容器常規操作 #include "stdafx.h" #include <iostream> #include <s

原创 【小練習】指針與引用:傳遞動態內存4

文章目錄1.練習代碼2.關鍵點分析2.1轉換過程2.2運行結果 1.練習代碼 #include "stdafx.h" #include <iostream> #include <stdio.h> using namespace std

原创 【小練習】循環、遞歸與概率:概率

文章目錄1.練習代碼-隨機在正方形裏面落1000個點,落在正方形內切圓中的點有多少個2.關鍵點分析2.1計數過程2.2運算結果 1.練習代碼-隨機在正方形裏面落1000個點,落在正方形內切圓中的點有多少個 #include "stda

原创 【小練習】指針與引用:傳遞動態內存2

文章目錄1.練習代碼-代碼中的問題是什麼?2.關鍵點分析 1.練習代碼-代碼中的問題是什麼? #include <iostream> void GetMemory(char *p, int num) { p = (char

原创 【小練習】指針與引用:傳遞動態內存1

文章目錄1.練習代碼-哪些函數能成功進行兩個數的交換?2.關鍵點分析 1.練習代碼-哪些函數能成功進行兩個數的交換? void swap1 (int p, int q) { int temp; temp = p;

原创 【小練習】程序設計基本概念:類型轉換3

文章目錄1.練習代碼2.關鍵點分析2.1轉換過程2.2運行結果 1.練習代碼 #include "stdafx.h" #include <iostream> #include <string.h> #include <conio.h>

原创 【小練習】指針與引用:基本問題

文章目錄1.練習代碼-找出錯誤2.關鍵點分析 1.練習代碼-找出錯誤 #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc,