- 博客(9)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 【蓝桥杯C++语言A1301】高斯日记(直接利用C语言time.h的精妙解法)
先给出<time.h>编程解法#include <iostream>#include <time.h>#include <iomanip>// Suppose Gauss was born in 1777-04-30,// and that day was denoted as 1 by him.// For example, the relative day of 1791-12-15// was represented as 5343.
2020-10-14 15:16:47 268
原创 【C++熟悉list训练】左移右入CycleROtatetoLeft
#include <iostream>#include <list>#include <iomanip>using namespace std;using rot_pos = long long int ;template <class T>ostream & operator<<(ostream & o,const list<T> & list ) { for(const auto &
2020-10-09 19:29:12 78
原创 C++没有std::bin?怎么显示二进制呢?强大类库教你最优雅简洁的二进制转化代码!
#include <bitset>#include <iostream>using namespace std;int main() { unsigned int hex_value0=0xaa; cout<<bitset<8>(hex_value0)<<endl; /* 如果没有放入 8*sizeof (typename),仅仅放入常数如8可能只能显示被截断的后端的八位的字符。 除非确定需要多少位,否
2020-10-09 08:30:50 201
原创 哈理工电信MATLAB音乐合成包络谐波代码
% 第零步:清场准备 clc;clear all;close all;% 第一步:输入 % 各音音高frequency(1*number_syllables的向量),g3_35=196.028;a3_37=220.0501;c4_40=262.0355;d4_42=291.9626;e4_44=330.0452;g4_47=392.0533;frequency=[c4_40 g4_47 c4_40 g4_47 c4_40 d4_42...e4_44 c.
2020-07-25 11:44:42 1847
原创 cpp primer plus chapter 3 programming exercise
#include <fstream>#include <iostream>#include <string>#include <iomanip>using namespace std;bool PE[7] = {0,0,0,0,0,0,1};//PE is the switch to the programming exercise.v...
2019-10-20 14:00:26 137
原创 c++L1-008 求整数段和 (10 分)
#include <iostream>#include <iomanip>using namespace std;int main() { //define and input int a = -100; int b = 100; cin >> a >> b; int sum = (a + b) * (b - a + 1) / 2;...
2019-09-29 13:25:08 639
原创 L1-007 念数字 (10 分)
#include <iostream>#include <string>using namespace std;int main() { //const string and input string c[10] = { "ling", "yi", "er", "san", "si", "wu", "liu", "qi", "ba", "jiu" }; ...
2019-09-28 16:59:26 313
原创 L1-005 考试座位号 (15 分)C++
//THIS PROGRAM IS DEALING WITH THE PTA PROBELM//@https://pintia.cn/problem-sets/994805046380707840/problems/994805140211482624//It is dealt with class so as to use dinamically stored.//Use the poin...
2019-09-13 15:53:07 122
原创 团体程序设计天梯赛-练习集 L1-002 打印沙漏(C++)
#include <iostream>#include <cmath>//We will use sqrt function.//原理:输入数字和符号;经过计算后,给出多余数字和最外层字符显示数;利用最外层字符显示数逐行输出,显示多余数字。//The core princple: First, we import the number and the chara...
2019-09-12 10:41:13 188
【哈理工电信】MATLAB在音乐合成中的应用--包络Matlab.docx
2020-07-25
TA创建的收藏夹 TA关注的收藏夹
TA关注的人