代码
花吻蜘蛛
这个作者很懒,什么都没留下…
展开
-
线性表的操作
#include<iostream>#include<stdlib.h> using namespace std;typedef int ElemType; struct List{ ElemType *list; int size; int MaxSize;}; void InitList (List &L){ L.MaxSize = 1...原创 2019-04-09 16:04:32 · 347 阅读 · 0 评论 -
栈的存储结构和操作
//栈的顺序存储结构和操作 #include<iostream> #include<stdlib.h> using namespace std; typedef int ElemType; //① 初始化栈S为空 struct Stack{ ElemType *stack; //存栈元素 int top; //存栈顶元素的下标位置 ...原创 2019-04-09 17:47:46 · 797 阅读 · 0 评论 -
用抽象数据类型ADT实现矩形面积周长计算
system("color 0A"); /*...ADT RECtangle is Data: float length,width; Operations: void InitRectangle(struct Rectangle& r,float len, float wid); float Circumference...转载 2019-05-15 18:12:55 · 1994 阅读 · 0 评论 -
求n个数中的最大值
//假定求N个数中最大的数 #include<iostream>const int n=10; //const别是这个数不能改using namespace std;int main(){ int i,x,a[n]; cout<<"请输入10个整数:"; for(i=0;i<n;i++) cin>>a[i]; x=a[0]; i...翻译 2019-06-17 22:54:48 · 4522 阅读 · 0 评论 -
c++输入输出,和随机数的产生
/*cin>>" ">>;cout<<" "<<endl;struct worker{ int id; char name[20]; float wage;};//对记录进行整体输入输出,必须对该类型进行提取和插入操作符的重载,他们的重载函数如下istream& operator>>(istream& i...原创 2019-06-18 17:02:24 · 379 阅读 · 0 评论