自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 spring cloud 跨域配置

前端 OPTIONS 请求出现 403 Forbidden 解决参见:

2024-04-17 23:41:57 107

原创 Java简易计算器

一个简单的Java计算器

2022-06-05 15:07:47 7122 9

原创 图的DFS/BFS遍历及基本操作

图的DFS/BFS遍历及基本操作#include <iostream>#include <queue>using namespace std;#define MaxV 50bool visited[MaxV];typedef struct AMGraph { char vexs[MaxV]; int arcs[MaxV][MaxV]; int vexnum, arcnum;}AM_UDG, AM_DG;struct ArcNode { int adjvex

2021-12-14 11:22:57 371

原创 c++_贪吃蛇

#include #include //setw()所需头文件#include <conio.h>//_kbhit(),_getch()所需头文件#include //生成随机数所需头文件#include <Windows.h>//gotoxy(),HideCursor()所需头文件using namespace std;//游戏地图大小#define High 25#define Width 50int moveDirection;//小蛇移动位置,上下左右分别用

2021-10-24 15:23:37 92

原创 c++_通讯录管理系统

一个简单没啥用的通讯录…#include <iostream>using namespace std;struct person{ string name; string sex; string birthday; string tel; string addr;};struct book{ person arr[1000]; int num = 0;};void menu(){ cout << "*************************

2020-11-18 22:22:27 107

原创 c++_battle

无聊时写的一个两人battle的程序#include <iostream>#include <ctime>using namespace std;struct role{ string name; int HP; int attack; int defense;};void battle(string name1, string name2){ srand(time(0)); int a_HP = rand() % 1001 + 1000; int a_

2020-11-18 22:20:06 139

原创 c++随机数组冒泡排序

#include <iostream>#include <ctime>using namespace std;int main(){ srand(time(0));//随机数种子 cout << "请输入一个数:" << endl; int n = 0; cin >> n; cout << "冒泡排序前:" << endl; int arr[1000]; for (int i = 0; i < n

2020-11-12 08:46:19 580 1

原创 c++ 猜数字

#include <iostream>#include <ctime>using namespace std;int main(){ srand((unsigned int)time(NULL)); int num = rand() % 100;//生成随机数0~99 int val = 0; cout << "猜数字" << endl; while (1) { cin >> val; if (val > num)

2020-11-11 00:21:44 221

原创 c++打印爱心

#include<iostream>#include<cmath>using namespace std;int main(){ float x, y; for (y = 1.5f; y > -1.5f; y -= 0.1f) { for (x = -1.5f; x < 1.5f; x += 0.05f) { float a = x * x + y * y - 1;

2020-11-11 00:19:08 703

原创 c++打印金字塔

代码如下#include <iostream>using namespace std;int main(){ int n = 0; cout << "请输入金字塔的层数:" << endl; cin >> n; for (int i = 1; i <= n; i++)//i为行数,n为目标金字塔的层数 { for (int j = 1; j <= n - i; j++)//j为" "的列数 { cout <&l

2020-11-11 00:10:35 3682

空空如也

空空如也

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

TA关注的人

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