C++
X_dmword
数据与生活同在
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
各种排序算法
1、工具 C++ 2、目的 利用不同的排序算法对一串数字进行排序 4、实现过程 算法1:插入排序 #include <iostream> #include <stdlib.h> using namespace std; //插入排序 void insert_sort(int a[],unsigned int first,unsigned int last){ ...原创 2018-06-02 23:38:03 · 239 阅读 · 0 评论 -
100以内的质数的三种实现
1、实现工具 C++ 2、实现目标 用穷举法找出1-100间的质数并显示出来,分别使用while,do…while, for循环语句 3、实现过程 ①while #include <iostream> #include <cmath> using namespace std; int main() { int i,j,k,flag; i=2; w...原创 2018-06-02 22:53:27 · 2617 阅读 · 3 评论
分享