#define _CRT_SECURE_NO_WARNINGS 1#include stdioh#includectypeh#includestdboolh#includestdlibh#includetimehint mainvoid char another_game = Y; bool correct = true; int counter = 0; int sequence_length
这段代码中,数字没有成功消失的原因是在打印数字序列后,没有清空屏幕上的内容。可以使用系统命令来清空屏幕,例如在Windows系统中可以使用system("cls")来清空屏幕,或者在Linux系统中使用system("clear")来清空屏幕。在打印数字序列前调用相应的系统命令即可清空屏幕上的内容。
原文地址: http://www.cveoy.top/t/topic/hZKL 著作权归作者所有。请勿转载和采集!