- 博客(5)
- 收藏
- 关注
原创 c++动画函数和代码
c++中几个动画用的代码:1.清除(头文件:#include <windows.h>)system("CLS");2.X,Y坐标void go(int x, int y) { HANDLE hout; COORD coord= {x,y}; hout=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hout,coord);}3.颜色void color(int m) { if(m>
2021-10-15 20:47:35
1306
3
原创 (纯ASCII码)猜数字游戏
#include <bits/stdc++.h>using namespace std;void Delay(int time) { clock_t now = clock(); while( clock() - now < time );}void post(int n) { char a[30]; a[1]=72; a[2]=101; a[3]=108; a[4]=a[3]; a[5]=111; a[6]=32; a.
2021-08-26 21:39:51
573
原创 c++:用iostream库制造cmath库函数
用iostream库制造3个cmath函数:abs,pow,sqrt.#include <iostream>using namespace std;int abs(int x){ return x>=0?x:-x;}int pow(int x,int y){ long long turn=1; for(int i=0;i<y;i++){ turn*=x; } return turn;}int sqrt(int x){ int tun=0; for(
2021-08-26 21:35:32
345
原创 c++ 这哪里错了?
#include <iostream>#include <cstring>#include <cstdio>using namespace std;//连接字符数组int string_connect(char line_1[1001],char line_2[1001]) { char c[1001] = {}; int len_1=strlen(line_1); int len_2=strlen(line_2); int lens=(len_1+l.
2021-08-26 20:50:51
136
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人