- 博客(4)
- 资源 (3)
- 收藏
- 关注
原创 汉诺塔程序加了一个log记录功能
#include<iostream>#include<fstream>using namespace std;ofstream hanoilog;int cc = 0;void supermove(char, char, char, int);int main(){ hanoilog.open("Hanoi Log.txt"); char anotherround; int ju = 0; do { ++ju; cc = 0; ch.
2022-04-07 20:47:14 203
原创 复习了一下递归,想起来了汉诺塔
函数递归搞一搞,汉诺塔的游戏。写完之后看了一眼网上大部分的做法都是在函数里直接加一个指针来计数,我用了一个全局变量,道理差不多,也能用。#include<iostream>using namespace std;int cc = 0;void supermove(char, char, char, int);int main(){ char anotherround; do { cc = 0; char bas, temp, des; int n;
2022-04-06 20:36:42 69
原创 复习了C++前几章,做一个ASCII码转换的小程序
复习了一下输入输出、for和switch,做了一个ASCII码转换的小东西。#include <iostream>#include <string>using namespace std;void numtoalfa(void);void alfatonum(void);void showthem(void);const int STARTOFASCII = 33;const int ENDOFASCII = 126;int main(){ int
2022-04-06 15:02:46 858
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人