自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 资源 (1)
  • 收藏
  • 关注

原创 python numpy的一些基本使用

呼呼呼

2022-01-24 16:53:43 1135

原创 类中运算符的重载及利用友元函数同等实现

#include<iostream>using namespace std;class complex {private: double real; double imag;public: complex operator +(complex& c2); complex add(complex& c); complex(double r, double i) { real = r; imag = i;} void output(); friend compl

2020-08-10 15:48:11 200

原创 利用链表,依次输出信息

struct t { char g; int num; struct t *next;}t1,t2,t3;struct t* head;int main(){ t1.g ='m'; t1.num = 1; t2.g ='w' ;t2.num = 2; t3.g = 'm'; t3.num = 3; head = &t1; t1.next = &t2; t2.next = &t3; t3.next = NULL; for (; head != NULL;

2020-08-09 15:33:44 189

原创 利用结构体投票程序,输出票最多的名字和票数

#include<iostream>#include<cmath>using namespace std;struct t { char name[20]; int num;};t a[3] = { {"w",0},{"y",0},{"h",0} };int main(){ int b(int m, int n, int k); for (int i = 0; i < 10; i++) { char name[20]; cin >>

2020-08-09 15:12:40 342

原创 输入一个字符串,然后输出字符数量

#include<iostream>using namespace std;int main(){ int length(char str[]); char str[20]; cin.get(str,20); cout << length(str) << endl;} int length(char str[]){ int i = 0; while (str[i] != '\0') { i++; } return i

2020-08-06 23:16:58 909

原创 折半排序法,给定一数组,输入一个值找到该值在数组中第几个

#include<iostream>#include<cmath>using namespace std;int main(){ int a[10] = { 1,4,6,8,9,12,14,15,18,23 }; int n; int find(int a[],int key); cout << "a num" << endl; cin >> n; cout << "第" << find(a, n)+1

2020-08-06 21:28:17 273

原创 给定一组确定序列数值(从小到大),再随机输入一个数,插入到合适的位置按序输出

#include<iostream>using namespace std;int main(){int a[5] = { 2,6,12,16 }; int num, end; cout << "Please enter a number and I will insert " << endl; cin >> num; end = a[3]; if (num >= end) a[4] = end; else

2020-08-05 19:04:14 365

原创 二维矩阵输入和元素相加

#include<iostream>#include<cmath>using namespace std;int main(){int a[3][3], sum1=0,sum2=0;for(int i=0;i<3;i++) for (int j = 0; j < 3; j++) { cin >> a[i][j]; }for (int k = 0; k < 3; k++) sum1 += a[k][k];for (int i =

2020-08-05 17:06:10 317

ConsoleApplication38.cpp

找出3×4矩阵中最大值并输出行列坐标及其最大值范围,新手写的一个程序

2020-08-03

空空如也

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

TA关注的人

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