自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (2)
  • 收藏
  • 关注

原创 封装string类

//Mystring.h#include using namespace std;class MyString{public:MyString();    //无参构造MyString(const char *p); //有参构造  C方式MyString(const MyString &obj);   //有参构造C++方式~MyString(

2017-05-16 23:09:32 638

原创 自己实现strcpy

#include char *mystrcpy(char *dest,const char *src){  if(dest==NULL&&src==NULL){  return;  }char *p=dest;while(*src!='\0'){ *dest++=*src++;}return p;}void main(){ cha

2017-05-15 15:31:20 482

原创 递归实现最大公约数最小公倍数

#define _CRT_SECURE_NO_WARNINGS#include int fun(int m, int n){if (m%n == 0){return n;              }else{return fun(n, m%n);                        }}void main(){int a, b

2017-05-15 15:15:52 608

原创 快速排序

#include #include void show(int *p, int length){for (int i = 0; i {printf("%4d", *(p + i));}}quick_sort(int *p, int start, int end){if (start{int i = start;for (int j = i +

2016-11-23 19:38:49 430

原创 删除一个字符串的一部分_02

//01 请编写函数。删除字符串的一部分。函数原型如下:////int del_substr(char *str, const char *substr);//函数首先判断substr是否出现在str中,如果并未出现,函数就返回0;如果出现,函数应该把str中该字符串后面的所有字符串赋值到该字符串位置,//从而删除这个字符串,然后函数返回1。如果substr多次出现在str中,函数

2016-11-13 17:39:13 1160

原创 C语言删除一个字符串的一部分

//01 请编写函数。删除字符串的一部分。函数原型如下:////int del_substr(char *str, const char *substr);//函数首先判断substr是否出现在str中,如果并未出现,函数就返回0;如果出现,函数应该把str中该字符串后面的所有字符串赋值到该字符串位置,//从而删除这个字符串,然后函数返回1。如果substr多次出现在str中,函数

2016-11-13 00:06:18 14568

原创 C语言求1-100以内的素数

#include #include void main(){for (int i = 1; i {int j = 2;for (; j{if (i%j == 0)break;}if (j>sqrt(i) && i != 1)printf("%d ", i);}system("pause");}

2016-11-06 21:52:16 25433

大数计数器

大数加减乘除计算器应用程序支持计算比较大的数的加减乘除计算

2015-12-08

递归汉诺塔

汉诺塔递归算法代码,执行步骤移动过程显示视图

2015-12-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除