C++
小二康
小二的学习空间
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++实现数据结构哈希表
#include<iostream>#include<string>#include <iomanip>using namespace std;#define HMax 8typedef struct node{ double key; string name; string address; node *next;}*list;li...原创 2019-12-12 15:46:26 · 559 阅读 · 0 评论 -
C++实现数据结构图
#include<iostream>using namespace std;#define Vnum 100 //顶点个数的最大值typedef struct EdgeNode{ int adjvex; float weight; struct EdgeNode *next;}*edgeptr;typedef struct{ int ve...原创 2019-11-29 14:00:03 · 602 阅读 · 0 评论 -
C++实现数据结构实验停车场管理系统
数据结构实验,实现一个简单的停车管理系统。原创 2019-11-29 13:49:09 · 3400 阅读 · 6 评论 -
C++实现数据结构实验约瑟夫环链表
@RK#include <iostream>using namespace std; class Node{ public: int data; Node *next;}; class CircleList{ public: Node* head; int length; CircleList() { h...原创 2019-11-27 22:35:41 · 596 阅读 · 0 评论 -
C++实现数据结构二叉树
#include<iostream>using namespace std;typedef struct btnode{ int data; struct btnode *Lchild,*Rchild;} *bitreptr;void CreateBtr(bitreptr &t){ int x; bitreptr p; cin>>x; i...原创 2019-11-29 13:56:59 · 300 阅读 · 0 评论 -
C++实现约瑟夫环顺序表
#include<iostream>#include<algorithm>using namespace std;int main(){ int i, j, m, n, a, b, c; cout<<"请输入总人数和间隔数"<<endl; cin>>n >>m; int *array = new int[n];...原创 2019-11-27 22:42:08 · 1204 阅读 · 0 评论 -
C++实现数据结构招工考试成绩处理
#include<iostream>#include<string>#define max 100using namespace std;typedef struct{ string name; int Politics,Mathematics,Physics,Chemistry;//政治,数学,物理,化学 int Total; ...原创 2019-12-05 18:54:58 · 315 阅读 · 0 评论 -
C++查找第n位斐波那契数列
查找斐波纳契数列中第 N 个数。所谓的斐波纳契数列是指:前2个数是 0 和 1 。第 i 个数是第 i-1 个数和第i-2 个数的和。斐波纳契数列的前10个数字是:0, 1, 1, 2, 3, 5, 8, 13, 21, 34 …int fibonacci(int n) { // write your code here if(n>2) { int Fib[n]; memset(Fib,0,sizeof(Fib原创 2020-06-16 10:13:11 · 569 阅读 · 2 评论 -
C++比较三个数中的最大值
int maxOfThreeNumbers(int num1, int num2, int num3) { // write your code here if(num1>=num2) { if(num1>=num3) return num1; else return num3; } else{ i原创 2020-06-16 10:02:43 · 1756 阅读 · 0 评论 -
C++实现字母的大小写转换
字母的大小写转换大小写之间的ASCII表之间相差32例如:‘A’ = 65,‘a’ = 97;通过所给字母的ASCII,得到所求的字母的ASCII,char lowercaseToUppercase(char character) { int a,b; char character1; a = character; b = a - 32; character1 = b; return character1原创 2020-06-16 09:54:30 · 1420 阅读 · 0 评论
分享