为中奥队加油的c++代码(无恶意)
  • 板块灌水区
  • 楼主leon0822
  • 当前回复4
  • 已保存回复4
  • 发布时间2024/8/2 17:57
  • 上次更新2024/8/2 19:14:32
查看原帖
为中奥队加油的c++代码(无恶意)
650866
leon0822楼主2024/8/2 17:57
#include <iostream>
using namespace std;

// ANSI转义代码
const std::string skyblue = "\033[36m";//天蓝色
const std::string purple = "\033[35m";//紫色
const std::string red = "\033[31m";      // 红色
const std::string green = "\033[32m";    // 绿色
const std::string yellow = "\033[33m";   // 黄色
const std::string darkblue = "\033[34m";     // 深蓝色
const std::string reset = "\033[0m";     // 重置颜色

int main() {
	// 打印彩色文本
	//cout<<"*****"<<endl;//白色
	//cout << green << "*****" << reset << endl;
	//cout << yellow << "*****" << reset << endl;
	//cout << skyblue << "*****" << reset << endl;
	//cout << darkblue << "*****" << reset << endl;
	//cout << purple << "*****" << reset << endl;
	cout << red << "*************************************" << reset << endl;
	cout << red << "*************************************" << reset << endl;
	cout<<red<<"*********"<<reset;
	cout<<yellow<<"*"<<reset;
	cout<<red<<"***************************"<<reset<<endl;
	cout << red << "*************************************" << reset << endl;
	cout<<red<<"***"<<reset;
	cout<<yellow<<"*"<<reset;
	cout<<red<<"********"<<reset;
	cout<<yellow<<"*"<<reset;
	cout<<red<<"************************"<<reset<<endl;
	cout<<red<<"*"<<reset;
	cout<<yellow<<"*****"<<reset;
	cout<<red<<"******"<<reset;
	cout<<red<<"*"<<reset;
	cout<<red<<"************************"<<reset<<endl;
	cout<<red<<"**"<<reset;
	cout<<yellow<<"*"<<reset;
	cout<<red<<"*"<<reset;
	cout<<yellow<<"*"<<reset;
	cout<<red<<"********************************"<<reset<<endl;
	cout<<red<<"************"<<reset;
	cout<<yellow<<"*"<<reset;
	cout<<red<<"************************"<<reset<<endl;
	cout<<red<<"*************************************"<<reset<<endl;
	cout<<red<<"*********"<<reset;
	cout<<yellow<<"*"<<reset;
	cout<<red<<"***************************"<<reset<<endl;
	cout << red << "*************************************" << reset << endl;
	cout << red << "*************************************" << reset << endl;
	cout<<red<<"中国奥运队"<<reset<<endl;
	cout<<yellow<<"绽放在巴黎"<<reset<<endl;
	cout<<skyblue<<"愿中奥队勇往直前"<<reset;
	return 0;
}
//草图
/*
 *************************************
 *************************************
 *********?***************************
 *************************************
 ***?********?************************
 *?????*******************************
 **?*?********************************
 ************?************************
 *************************************
 *********?***************************
 *************************************
 *************************************
 */

如有意见,请多多指教(作者不是日本人),五星红旗比例可能不对;

违规紫衫

对了,我的代码有点繁琐,有没有更好的方法
2024/8/2 17:57
加载中...