zoukankan      html  css  js  c++  java
  • 浪漫的表白小程序

    #include<iostream>
    #include<windows.h>
    #include<stdio.h>
    #define stoptimeshort  40
    #define stoptimelong   100
    using namespace std;
    int main()
    {
        //////////////////
        char ch[10];
        int f[9][36]={  0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
                        0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,
                        0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,
                        0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,
                        0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,
                        0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
                        0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
                        0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,
                        0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0
                     };
        int s[9][21]={  0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,
                        0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1,0,
                        1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,
                        1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,
                        0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,
                        0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,
                        0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,
                        0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,
                        0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,
                     };
        int t[9][22]={  0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,
                        0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,
                        1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,
                        1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,
                        0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,
                        0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,
                        0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,
                        0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,
                        0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
                     };
        system ( "title I Love You" );
        //////////////////
        printf ( "%s","        " );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        ////////////////////////////////
        printf ( "%s","        " );
        system ( "color 72" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        ///////////////////////////
        printf ( "%s","        " );
        system ( "color 79" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        /////////////////////////////
        printf ( "%s","        " );
        system ( "color 7c" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        ///////////////////////////////
        printf ( "%s","        " );
        system ( "color 7d" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        ///////////////////////////////
        printf ( "%s","        " );
        system ( "color 7e" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        //////////////////////////////
        printf ( "%s","        " );
        system ( "color 7a" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        ///////////////////////////////
        printf ( "%s","        " );
        system ( "color 7b" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","说:
    " );
        ///////////////////////////////
        printf ( "%s","        " );
        system ( "color 79" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        /////////////////////////////////
        printf ( "%s","        " );
        system ( "color 72" );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        //////////////////////////////////
        Sleep ( stoptimelong );
        system ( "color fc" );
        for ( int i=0; i<9; i++ )
        {
            cout<<"        ";
            for ( int j=0; j<36; j++ )
            {
                if ( f[i][j]==0 )
                    cout<<" ";
                else
                    cout<<"*";
            }
            cout<<endl;
            Sleep ( 100 );
        }
        /////////////////////////////////////
    line:
        printf ( "%s","        " );
        Sleep ( stoptimelong );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","" );
        Sleep ( stoptimeshort );
        printf ( "%s","?(Y/N)" );
        ////////////////////////////////////
        cout<<endl;
        cout<<"        ";
        cin>>ch;
        Sleep ( stoptimelong );
        if ( ch[0]=='y'||ch[0]=='Y' )
        {
            system ( "color fc" );
            for ( int i=0; i<9; i++ )
            {
                cout<<"        ";
                for ( int j=0; j<21; j++ )
                {
                    if ( s[i][j]==0 )
                        cout<<" ";
                    else
                        cout<<"*";
                }
                cout<<endl;
                Sleep ( 100 );
            }
            Sleep ( 3000 );
        }
        else
        {
            if ( ch[0]=='n'||ch[0]=='N' )
            {
                system ( "color 0f" );
                for ( int i=0; i<9; i++ )
                {
                    cout<<"        ";
                    for ( int j=0; j<22; j++ )
                    {
                        if ( t[i][j]==0 )
                            cout<<" ";
                        else
                            cout<<"*";
                    }
                    cout<<endl;
                    Sleep ( 100 );
                }
                printf ( "%s","        " );
                Sleep ( stoptimelong );
                printf ( "%s","" );
                Sleep ( stoptimeshort );
                printf ( "%s","" );
                Sleep ( stoptimeshort );
                printf ( "%s","" );
                Sleep ( stoptimeshort );
                printf ( "%s","……
    " );
            }
            else
                goto line;
        }
        system ( "color 0f" );
        system ( "pause" );
    }

    效果截图

      

  • 相关阅读:
    Spring 实例化bean的三种方式
    Mybatis和Hibernate比较
    MyBatis学习总结(一)——MyBatis快速入门
    Java EE的十三个规范
    Python 测试代码覆盖率统计工具 coverage.py
    mysql explain执行计划详解
    Django模型的Field Types
    使程序在Linux下后台运行,程序运行前后台切换
    ubuntu中将本地文件上传到服务器
    Python-内置函数小结
  • 原文地址:https://www.cnblogs.com/Kobe10/p/5779726.html
Copyright © 2011-2022 走看看