随笔分类 - C/C++
摘要:#include #include #includeint main(){ int n,i, j = 0,k; for...
阅读全文
摘要:#include #include int main(){ int a[10]; int i, j,max,min,t;...
阅读全文
摘要:/*冒泡法排序 *n个数 *n-1趟 *第j趟比较n-j次 *小的靠前大的靠后*/#include #include int mai...
阅读全文
摘要:顺序表 #ifndef SEQLIST_H #define SEQLIST_H //顺序存储 typedef int DataType; struct Node { int MaxNum; //顺序表表中最大存储元素个数 int num; DataType *element; }; typedef
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> #include<string.h> #define Size sizeof(struct Student) struct Student *p = NULL;//接收返回的头指针 typedef struct Stude
阅读全文
摘要:编写程序实现以下功能 编写程序,打印99乘法表将一面额为10元倍数的整钱(<=100元)换成1元、2元和5元的零钱组合(每种面值都要有)。输入要换的面额(如10元),输出所有可能的换法(如2种)。 进阶:若希望换出来的零钱数量越少越好,怎么修改程序可以很快得到最优方案?输入一行字符,统计其中单词的个
阅读全文
摘要:#pragma once #ifndef _SEQSTACK_ #define _SEQSTACK_ #include <iostream> using namespace std; typedef int DataType; struct SeqStack { int MAXNUM; int t;
阅读全文
摘要:#pragma once #ifndef _LINKSTACK_ #define _LINKSTACK_ #include<iostream> using namespace std; typedef int DataType; //链栈结构信息 struct node { DataType inf
阅读全文