• 心型


     1 #include <iostream>
     2 #include<windows.h>
     3 using namespace std;
     4 
     5 int main() {
     6 for(int i=1;i<10000;i++){
     7     Sleep(100);
     8     if(i%7==0)
     9         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
    10     else if(i%7==1)
    11         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
    12     else if(i%7==2)
    13         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);
    14     else if(i%7==3)
    15         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);
    16     else if(i%7==4)
    17         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
    18     else if(i%7==5)
    19         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
    20     else
    21         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN |FOREGROUND_BLUE);
    22     cout<<endl;
    23     cout<<"                                       *************   *************"<<endl;
    24     cout<<"                                     *********************************"<<endl;
    25     cout<<"                                   *************************************"<<endl;
    26     cout<<"                                   *************************************"<<endl;
    27     cout<<"                                   *************************************"<<endl;
    28     cout<<"                                   *************************************"<<endl;
    29     cout<<"                                   *************************************"<<endl;
    30     cout<<"                                   *************************************"<<endl;
    31     cout<<"                                    ***********************************"<<endl;
    32     cout<<"                                     *********************************"<<endl;
    33     cout<<"                                       *****************************"<<endl;
    34     cout<<"                                        ***************************"<<endl;
    35     cout<<"                                          ***********************"<<endl;
    36     cout<<"                                             *****************"<<endl;
    37     cout<<"                                               *************"<<endl;
    38     cout<<"                                                   *****"<<endl;
    39     cout<<"                                                     *"<<endl;
    40     Sleep(1000);
    41     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
    42     system("cls");
    43 }
    44     return 0;
    45 }
  • 相关阅读:
    MongoDB 基本概念
    MongoDB 设置参数
    MongoDB 操作数据库
    MongoDB 目录分析、基础命令、参数设置
    Windows下MongoDB的下载安装、环境配置
    MongoDB 简介
    SQL与NoSQL
    es6 箭头函数(arrow function) 学习笔记
    WebPack 简明学习教程
    vue自定义指令
  • 原文地址:https://www.cnblogs.com/gzu_zb/p/9748873.html
Copyright © 2020-2023  润新知