C++
十年 lius
前端
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
统计英文句子中的字符个数
#include<iostream> #include <string> using namespace std ; int count(string Str) //统计字符串个数的函数 { int i = 0, cnt = 0; for (i=0; i<Str.length(); i++) { if (Str[i]>='a' &&...原创 2018-10-20 15:34:16 · 2525 阅读 · 0 评论 -
算法课本4-10定义一个人员类并逐渐增加他的功能
#include<iostream> #include<string> using namespace std; class date { private: int year; int month; int day; public: date(){}; //二、构造函数重载 //在一...原创 2020-02-13 10:28:28 · 132 阅读 · 0 评论 -
很简单的冒泡排序
#include <iostream> using namespace std; void sort(int r[100], int n) //冒泡排序的实现 { int t; int i; int bound,exchange=n-1; while(exchange!=0) { bound=exchange;exchange=0; for(int j=0;...原创 2018-10-23 15:36:43 · 148 阅读 · 0 评论 -
分割法判断一个很大的数能否整除11
#include<iostream> using namespace std; #include<string.h> void ol(int a[], int num) { int result=0; int m; for(int i=0;i<num;i++) { m = num - i; if(m%2==0) result+=a[i]*10;...原创 2018-10-20 15:28:31 · 1832 阅读 · 0 评论
分享