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" );
    }

    效果截图

      

  • 相关阅读:
    POJ 2427 Smith's Problem Pell方程
    Codeforces Round #194 (Div. 2) 部分题解
    SPOJ 3899. Finding Fractions 连分数
    Codeforces Round #193 (Div. 2) 部分题解
    HDU 1402 A * B Problem Plus FFT
    F的ACM暑期集训计划
    HDU 4607 Park Visit HDU暑期多校1
    Windows 下 Sublime Text 默认打开方式问题解决办法
    Roman To Integer
    Longest Common Prefix
  • 原文地址:https://www.cnblogs.com/Kobe10/p/5779726.html
Copyright © 2011-2022 走看看