自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 关于涵数调用传值方式的若干思考

首先让我们看一下下面几个小程序: (输入两个数,按大小顺序输——观察一下输出的数值是否能达到目的) //值传递 #include using namespace std; int main() {  void max(int a,int b);  int x,y;         cin>>x>>y;  max(x,y);  cout return 0; } void

2012-11-21 12:46:43 507

原创 小小动态链表

#include #include using namespace std; struct stu{ int number; string name; struct stu*next; }; void creat(stu*head); void print(stu*head); void insert(stu*head); void del(stu*head); void

2012-11-19 22:42:14 437

原创 递归中的汉诺塔

//A----->C #include using namespace std; int main() {  int n;  void hannuo(int n,char A,char B,char C);  cout  cin>>n;  hannuo(n,'A','C','B');  cout return 0; } void hannuo(int n,char A,

2012-11-19 22:44:33 500

原创 简单无参函数调用求成1~4组成的三位数

#include using namespace std; int main() {  void fun();     fun(); return 0; } void fun() {     for(int i=1;i   for(int j=1;j    for(int k=1;k      cout }

2012-11-14 22:01:53 530

原创 位操作+递归 (十进制转为二进制)

//位操作+递归  (十进制转为二进制) #include using namespace std; void print(int,int); int main() { unsigned int x; cout cin>>x; print(x,16); cout return 0; } void print(int x,int n) { if(n>0) { p

2012-11-13 21:33:28 514

原创 动态分配内存空间

#include #include using namespace std; struct stud{ int number; string name; int score; }; int main(void) {stud *p;//开辟动态内存 p=new stud; cout cin>>p->name; cout cin>>p->number ; cout ci

2012-11-11 15:28:23 531

原创 vc++对文件的读取,写入操作

//读取 #include #include using namespace std; int main(){ fstream infile; infile.open ("F:\ll.txt"); char a[10]; while(!infile.eof ()) { infile.getline (a,sizeof(a)); cout } infile.close ;

2012-11-09 21:21:16 731

原创 递归法解决猴子偷梅子问题

#include #include using namespace std; int main() { int mokey(int i);   int i;   for(i=1;i   cout return 0; } //递归调用 int mokey(int i) { int c;    if (i==1) c=1;    else    c=mokey(i-1

2012-11-09 21:16:24 749

原创 c++几种数据结构

#include using namespace std; int i,n=30; int main(){ char c; void picture(); void lingxing(); void dengyao(); void lx(); void daojiao(); void max(); void min(); picture(); cin>>c; switc

2012-11-09 19:30:08 432

原创 二分,插入,选择,冒泡,希尔排序

#include using namespace std ; void swap(); void bubble(int a[],int n); int main() { //冒泡法排序 int n,a[8]; int i; cout cin>>n; cout for(i=0;i>a[i] ; bubble(a,n); cout for(i=0;i return 0

2012-11-03 16:52:31 428

原创 C++打印菱形

#include using namespace std; void main(){ int j,i,n; cin>>n; for(i=0;i {        for(j=0;j     cout           for(j=0;j     cout cout } for(i=0;i cout cout for(i=0;i {        for(j=0

2012-11-03 16:48:18 847

原创 C++中简单的获取时间程序

#include using namespace std; #include int main() { int t,t1,t2; time_t now; struct tm*fmt; time(&now); fmt=localtime(&now); t1=fmt->tm_sec; t2=fmt->tm_sec; cout return 0; }

2012-11-03 16:43:47 422

空空如也

空空如也

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

TA关注的人

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