赞
踩
今天是2024年,我做了一段放烟花程序祝CSDN的朋友们新年快乐!
2024的放烟花程序
以下是代码,虽然多但简单
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
void space(int n){
for(int i=1;i<=n;++i) cout<<" ";
}
void yanhua(){
cout<<"\n\n\n\n";
space(39);
cout<<"+\n";
system("cls");
cout<<"\n\n\n";space(38);
cout<<"\\|/\n";space(38);cout<<"-+-\n";
space(38);cout<<"/|\\";
system("cls");
cout<<"\n\n";
space(36);
cout<<"\\ | /\n";space(37);
cout<<"\\|/\n";space(36);
cout<<"--+--\n";space(37);cout<<"/|\\\n";
space(36);
cout<<"/ | \\\n";
system("cls");
cout<<"\n";space(35);
cout<<"\\ | /\n";
space(36);
cout<<"\\ | /\n";space(37);
cout<<"\\|/\n";space(35);
cout<<"---+---\n";space(37);cout<<"/|\\\n";
space(36);
cout<<"/ | \\\n";space(35);
cout<<"/ | \\";
system("cls");
Sleep(500);
}
int main(){
system("color 0F");
for(int i=1;i<=15;i++){
for(int j=1;j<=20-i;j++) cout<<"\n";
cout<<" ||";
system("cls");
}
system("color F7");
cout<<"\n\n\n\n";
system("cls");
system("color 0F");
yanhua();
system("color 0C");
yanhua();
system("color 0E");
yanhua();
system("color 0A");
yanhua();
system("color 0B");
yanhua();
system("color 09");
yanhua();
system("color 0D");
yanhua();
system("color 0C");
cout<<"\n\n\n\n\n 今天是2024年1月1日,祝大家新年快乐!\n\n\n\n";
system("pause");
return 0;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。